Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteda9ce1

Browse files
authored
gh-106320: Move _PyNone_Type to the internal C API (#107030)
Move private types _PyNone_Type and _PyNotImplemented_Type tointernal C API.
1 parent89f9875 commiteda9ce1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

‎Include/cpython/object.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,6 @@ PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *);
377377
#endif
378378

379379

380-
PyAPI_DATA(PyTypeObject)_PyNone_Type;
381-
PyAPI_DATA(PyTypeObject)_PyNotImplemented_Type;
382-
383380
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
384381
* Defined in object.c.
385382
*/

‎Include/internal/pycore_object.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ extern PyObject* _PyCFunctionWithKeywords_TrampolineCall(
438438
(meth)((self), (args), (kw))
439439
#endif// __EMSCRIPTEN__ && PY_CALL_TRAMPOLINE
440440

441+
// _pickle shared extension uses _PyNone_Type and _PyNotImplemented_Type
442+
PyAPI_DATA(PyTypeObject)_PyNone_Type;
443+
PyAPI_DATA(PyTypeObject)_PyNotImplemented_Type;
444+
441445
#ifdef__cplusplus
442446
}
443447
#endif

‎Modules/_pickle.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include"pycore_bytesobject.h"// _PyBytesWriter
1313
#include"pycore_ceval.h"// _Py_EnterRecursiveCall()
1414
#include"pycore_moduleobject.h"// _PyModule_GetState()
15+
#include"pycore_object.h"// _PyNone_Type
1516
#include"pycore_pystate.h"// _PyThreadState_GET()
1617
#include"pycore_runtime.h"// _Py_ID()
1718
#include"structmember.h"// PyMemberDef

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp