mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-106320: Create pycore_modsupport.h header file (#106355)
Remove the following functions from the C API, move them to the internal C API: add a new pycore_modsupport.h internal header file: * PyModule_CreateInitialized() * _PyArg_NoKwnames() * _Py_VaBuildStack() No longer export these functions.
This commit is contained in:
parent
5ccbbe5bb9
commit
35963da40f
20 changed files with 56 additions and 18 deletions
29
Include/internal/pycore_modsupport.h
Normal file
29
Include/internal/pycore_modsupport.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef Py_INTERNAL_MODSUPPORT_H
|
||||
#define Py_INTERNAL_MODSUPPORT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
|
||||
extern int _PyArg_NoKwnames(const char *funcname, PyObject *kwnames);
|
||||
#define _PyArg_NoKwnames(funcname, kwnames) \
|
||||
((kwnames) == NULL || _PyArg_NoKwnames((funcname), (kwnames)))
|
||||
|
||||
extern PyObject ** _Py_VaBuildStack(
|
||||
PyObject **small_stack,
|
||||
Py_ssize_t small_stack_len,
|
||||
const char *format,
|
||||
va_list va,
|
||||
Py_ssize_t *p_nargs);
|
||||
|
||||
extern PyObject* _PyModule_CreateInitialized(PyModuleDef*, int apiver);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // !Py_INTERNAL_MODSUPPORT_H
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue