diff options
author | Victor Stinner <vstinner@python.org> | 2022-02-24 16:51:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-24 16:51:59 (GMT) |
commit | 042f31da552c19054acd3ef7bb6cfd857bce172b (patch) | |
tree | d1aa8f20f873c89adebbac7072d80dceb19d32c4 /Include/moduleobject.h | |
parent | ec091bd47e2f968b0d1631b9a8104283a7beeb1b (diff) | |
download | cpython-042f31da552c19054acd3ef7bb6cfd857bce172b.zip cpython-042f31da552c19054acd3ef7bb6cfd857bce172b.tar.gz cpython-042f31da552c19054acd3ef7bb6cfd857bce172b.tar.bz2 |
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".
Diffstat (limited to 'Include/moduleobject.h')
-rw-r--r-- | Include/moduleobject.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 0f40683..2d41f76 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -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; |