summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-03 09:39:11 (GMT)
committerGitHub <noreply@github.com>2023-07-03 09:39:11 (GMT)
commit35963da40fb7bc93c55d94caf58ff9e268df951d (patch)
tree06f5c1ef62c3f23351ecc9de7caf260f42a4c937 /Objects
parent5ccbbe5bb9a659fa8f2fe551428c84cc14015f44 (diff)
downloadcpython-35963da40fb7bc93c55d94caf58ff9e268df951d.zip
cpython-35963da40fb7bc93c55d94caf58ff9e268df951d.tar.gz
cpython-35963da40fb7bc93c55d94caf58ff9e268df951d.tar.bz2
gh-106320: Create pycore_modsupport.h header file (#106355)
Remove the following functions from the C API, move them to the internal C API: add a new pycore_modsupport.h internal header file: * PyModule_CreateInitialized() * _PyArg_NoKwnames() * _Py_VaBuildStack() No longer export these functions.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/boolobject.c5
-rw-r--r--Objects/call.c1
-rw-r--r--Objects/enumobject.c1
-rw-r--r--Objects/floatobject.c1
-rw-r--r--Objects/listobject.c1
-rw-r--r--Objects/moduleobject.c3
-rw-r--r--Objects/rangeobject.c3
-rw-r--r--Objects/setobject.c1
-rw-r--r--Objects/tupleobject.c1
-rw-r--r--Objects/typeobject.c1
-rw-r--r--Objects/weakrefobject.c1
11 files changed, 15 insertions, 4 deletions
diff --git a/Objects/boolobject.c b/Objects/boolobject.c
index f43e26f..bbb187c 100644
--- a/Objects/boolobject.c
+++ b/Objects/boolobject.c
@@ -1,8 +1,9 @@
/* Boolean type, a subtype of int */
#include "Python.h"
-#include "pycore_object.h" // _Py_FatalRefcountError()
-#include "pycore_long.h" // FALSE_TAG TRUE_TAG
+#include "pycore_long.h" // FALSE_TAG TRUE_TAG
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
+#include "pycore_object.h" // _Py_FatalRefcountError()
#include "pycore_runtime.h" // _Py_ID()
#include <stddef.h>
diff --git a/Objects/call.c b/Objects/call.c
index 16c41ff..5045c0d 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -2,6 +2,7 @@
#include "pycore_call.h" // _PyObject_CallNoArgsTstate()
#include "pycore_ceval.h" // _Py_EnterRecursiveCallTstate()
#include "pycore_dict.h" // _PyDict_FromItems()
+#include "pycore_modsupport.h" // _Py_VaBuildStack()
#include "pycore_object.h" // _PyCFunctionWithKeywords_TrampolineCall()
#include "pycore_pyerrors.h" // _PyErr_Occurred()
#include "pycore_pystate.h" // _PyThreadState_GET()
diff --git a/Objects/enumobject.c b/Objects/enumobject.c
index c9d9058..5566667 100644
--- a/Objects/enumobject.c
+++ b/Objects/enumobject.c
@@ -3,6 +3,7 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_long.h" // _PyLong_GetOne()
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "clinic/enumobject.c.h"
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 83a263c..fa55481 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -9,6 +9,7 @@
#include "pycore_initconfig.h" // _PyStatus_OK()
#include "pycore_interp.h" // _PyInterpreterState.float_state
#include "pycore_long.h" // _PyLong_GetOne()
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_Init()
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
#include "pycore_pystate.h" // _PyInterpreterState_GET()
diff --git a/Objects/listobject.c b/Objects/listobject.c
index f1f324f..98fa089 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -5,6 +5,7 @@
#include "pycore_interp.h" // PyInterpreterState.list
#include "pycore_list.h" // struct _Py_list_state, _PyListIterObject
#include "pycore_long.h" // _PyLong_DigitCount
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_tuple.h" // _PyTuple_FromArray()
#include <stddef.h>
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index bda25c8..d4fccae 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -5,8 +5,9 @@
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_interp.h" // PyInterpreterState.importlib
#include "pycore_object.h" // _PyType_AllocNoTrack
-#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_moduleobject.h" // _PyModule_GetDef()
+#include "pycore_modsupport.h" // _PyModule_CreateInitialized()
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "structmember.h" // PyMemberDef
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index beb86b9..6dc41d7 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -2,8 +2,9 @@
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
-#include "pycore_range.h"
#include "pycore_long.h" // _PyLong_GetZero()
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
+#include "pycore_range.h"
#include "pycore_tuple.h" // _PyTuple_ITEMS()
#include "structmember.h" // PyMemberDef
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 58f0ae7..4ac541b 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -32,6 +32,7 @@
*/
#include "Python.h"
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include <stddef.h> // offsetof()
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 991edcc..e85af2b 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -5,6 +5,7 @@
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
#include "pycore_initconfig.h" // _PyStatus_OK()
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GC_TRACK(), _Py_FatalRefcountError()
/*[clinic input]
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 3d3a63a..87519ef 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -8,6 +8,7 @@
#include "pycore_frame.h" // _PyInterpreterFrame
#include "pycore_long.h" // _PyLong_IsNegative()
#include "pycore_memoryobject.h" // _PyMemoryView_FromBufferProc()
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_moduleobject.h" // _PyModule_GetDef()
#include "pycore_object.h" // _PyType_HasFeature()
#include "pycore_pyerrors.h" // _PyErr_Occurred()
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index f3f6c86..bac3e79 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -1,4 +1,5 @@
#include "Python.h"
+#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR()
#include "pycore_weakref.h" // _PyWeakref_GET_REF()
#include "structmember.h" // PyMemberDef