mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-45459: C API uses type names rather than structure names (GH-31528)
Thanks to the new pytypedefs.h, it becomes to use type names like PyObject rather like structure names like "struct _object".
This commit is contained in:
parent
ec091bd47e
commit
042f31da55
23 changed files with 69 additions and 75 deletions
|
@ -32,12 +32,12 @@ PyAPI_FUNC(void) _PyModule_Clear(PyObject *);
|
|||
PyAPI_FUNC(void) _PyModule_ClearDict(PyObject *);
|
||||
PyAPI_FUNC(int) _PyModuleSpec_IsInitializing(PyObject *);
|
||||
#endif
|
||||
PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*);
|
||||
PyAPI_FUNC(PyModuleDef*) PyModule_GetDef(PyObject*);
|
||||
PyAPI_FUNC(void*) PyModule_GetState(PyObject*);
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
||||
/* New in 3.5 */
|
||||
PyAPI_FUNC(PyObject *) PyModuleDef_Init(struct PyModuleDef*);
|
||||
PyAPI_FUNC(PyObject *) PyModuleDef_Init(PyModuleDef*);
|
||||
PyAPI_DATA(PyTypeObject) PyModuleDef_Type;
|
||||
#endif
|
||||
|
||||
|
@ -56,6 +56,7 @@ typedef struct PyModuleDef_Base {
|
|||
}
|
||||
|
||||
struct PyModuleDef_Slot;
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
||||
/* New in 3.5 */
|
||||
typedef struct PyModuleDef_Slot{
|
||||
|
@ -78,7 +79,7 @@ struct PyModuleDef {
|
|||
const char* m_doc;
|
||||
Py_ssize_t m_size;
|
||||
PyMethodDef *m_methods;
|
||||
struct PyModuleDef_Slot* m_slots;
|
||||
PyModuleDef_Slot *m_slots;
|
||||
traverseproc m_traverse;
|
||||
inquiry m_clear;
|
||||
freefunc m_free;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue