mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937)
This commit is contained in:
parent
0c1a42cf9c
commit
507896d97d
8 changed files with 14 additions and 1 deletions
|
|
@ -275,7 +275,6 @@ typedef struct _heaptypeobject {
|
|||
|
||||
PyAPI_FUNC(const char *) _PyType_Name(PyTypeObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyType_GetModuleByDef(PyTypeObject *, PyModuleDef *);
|
||||
PyAPI_FUNC(PyObject *) PyType_GetDict(PyTypeObject *);
|
||||
|
||||
PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
|
||||
|
|
|
|||
|
|
@ -1247,6 +1247,10 @@ static inline int PyType_CheckExact(PyObject *op) {
|
|||
# define PyType_CheckExact(op) PyType_CheckExact(_PyObject_CAST(op))
|
||||
#endif
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
|
||||
PyAPI_FUNC(PyObject *) PyType_GetModuleByDef(PyTypeObject *, PyModuleDef *);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue