mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
gh-106320: Move _PyNone_Type to the internal C API (#107030)
Move private types _PyNone_Type and _PyNotImplemented_Type to internal C API.
This commit is contained in:
parent
89f9875448
commit
eda9ce1487
3 changed files with 5 additions and 3 deletions
|
@ -377,9 +377,6 @@ PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
PyAPI_DATA(PyTypeObject) _PyNone_Type;
|
|
||||||
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
|
|
||||||
|
|
||||||
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
|
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
|
||||||
* Defined in object.c.
|
* Defined in object.c.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -438,6 +438,10 @@ extern PyObject* _PyCFunctionWithKeywords_TrampolineCall(
|
||||||
(meth)((self), (args), (kw))
|
(meth)((self), (args), (kw))
|
||||||
#endif // __EMSCRIPTEN__ && PY_CALL_TRAMPOLINE
|
#endif // __EMSCRIPTEN__ && PY_CALL_TRAMPOLINE
|
||||||
|
|
||||||
|
// _pickle shared extension uses _PyNone_Type and _PyNotImplemented_Type
|
||||||
|
PyAPI_DATA(PyTypeObject) _PyNone_Type;
|
||||||
|
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "pycore_bytesobject.h" // _PyBytesWriter
|
#include "pycore_bytesobject.h" // _PyBytesWriter
|
||||||
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
||||||
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
||||||
|
#include "pycore_object.h" // _PyNone_Type
|
||||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||||
#include "pycore_runtime.h" // _Py_ID()
|
#include "pycore_runtime.h" // _Py_ID()
|
||||||
#include "structmember.h" // PyMemberDef
|
#include "structmember.h" // PyMemberDef
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue