mirror of https://github.com/python/cpython
bpo-45459: Fix PyModuleDef_Slot type in the limited C API (GH-31668)
Move the type definition to pytypedefs.h.
This commit is contained in:
parent
4173d677a1
commit
0b63215bb1
|
@ -55,14 +55,12 @@ typedef struct PyModuleDef_Base {
|
||||||
NULL, /* m_copy */ \
|
NULL, /* m_copy */ \
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PyModuleDef_Slot;
|
|
||||||
|
|
||||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
||||||
/* New in 3.5 */
|
/* New in 3.5 */
|
||||||
typedef struct PyModuleDef_Slot{
|
struct PyModuleDef_Slot {
|
||||||
int slot;
|
int slot;
|
||||||
void *value;
|
void *value;
|
||||||
} PyModuleDef_Slot;
|
};
|
||||||
|
|
||||||
#define Py_mod_create 1
|
#define Py_mod_create 1
|
||||||
#define Py_mod_exec 2
|
#define Py_mod_exec 2
|
||||||
|
|
|
@ -10,6 +10,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct PyModuleDef PyModuleDef;
|
typedef struct PyModuleDef PyModuleDef;
|
||||||
|
typedef struct PyModuleDef_Slot PyModuleDef_Slot;
|
||||||
typedef struct PyMethodDef PyMethodDef;
|
typedef struct PyMethodDef PyMethodDef;
|
||||||
typedef struct PyGetSetDef PyGetSetDef;
|
typedef struct PyGetSetDef PyGetSetDef;
|
||||||
typedef struct PyMemberDef PyMemberDef;
|
typedef struct PyMemberDef PyMemberDef;
|
||||||
|
|
Loading…
Reference in New Issue