summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-22 15:04:34 (GMT)
committerGitHub <noreply@github.com>2023-07-22 15:04:34 (GMT)
commit5e4af2a3e90d78fdf6a4cc42e0472576b1f2b975 (patch)
tree288d255165674d6464a2739cf5254cc83561d9c5 /Python
parentc92ef6fe0e1384c090b94143cdc01e5e114a8747 (diff)
downloadcpython-5e4af2a3e90d78fdf6a4cc42e0472576b1f2b975.zip
cpython-5e4af2a3e90d78fdf6a4cc42e0472576b1f2b975.tar.gz
cpython-5e4af2a3e90d78fdf6a4cc42e0472576b1f2b975.tar.bz2
gh-106320: Move private _PySet API to the internal API (#107041)
* Add pycore_setobject.h header file. * Move the following API to the internal C API: * _PySet_Dummy * _PySet_NextEntry() * _PySet_Update()
Diffstat (limited to 'Python')
-rw-r--r--Python/ast_opt.c5
-rw-r--r--Python/bytecodes.c7
-rw-r--r--Python/ceval.c7
-rw-r--r--Python/compile.c3
-rw-r--r--Python/executor.c1
-rw-r--r--Python/marshal.c3
-rw-r--r--Python/pylifecycle.c1
7 files changed, 17 insertions, 10 deletions
diff --git a/Python/ast_opt.c b/Python/ast_opt.c
index 276e910..ad1e312 100644
--- a/Python/ast_opt.c
+++ b/Python/ast_opt.c
@@ -1,9 +1,10 @@
/* AST Optimizer */
#include "Python.h"
#include "pycore_ast.h" // _PyAST_GetDocString()
-#include "pycore_long.h" // _PyLong
-#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_format.h" // F_LJUST
+#include "pycore_long.h" // _PyLong
+#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_setobject.h" // _PySet_NextEntry()
typedef struct {
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 3a191ac..7ce8978 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -10,23 +10,24 @@
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_ceval.h" // _PyEval_SignalAsyncExc()
#include "pycore_code.h"
+#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#include "pycore_function.h"
+#include "pycore_instruments.h"
#include "pycore_intrinsics.h"
#include "pycore_long.h" // _PyLong_GetZero()
-#include "pycore_instruments.h"
-#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_moduleobject.h" // PyModuleObject
+#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_opcode.h" // EXTRA_CASES
#include "pycore_opcode_metadata.h" // uop names
#include "pycore_opcode_utils.h" // MAKE_FUNCTION_*
#include "pycore_pyerrors.h" // _PyErr_GetRaisedException()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_range.h" // _PyRangeIterObject
+#include "pycore_setobject.h" // _PySet_NextEntry()
#include "pycore_sliceobject.h" // _PyBuildSlice_ConsumeRefs
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "pycore_tuple.h" // _PyTuple_ITEMS()
#include "pycore_typeobject.h" // _PySuper_Lookup()
-#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#include "pycore_dict.h"
#include "dictobject.h"
diff --git a/Python/ceval.c b/Python/ceval.c
index 9f2855f..e9f082f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -7,24 +7,25 @@
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_ceval.h" // _PyEval_SignalAsyncExc()
#include "pycore_code.h"
+#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#include "pycore_function.h"
+#include "pycore_instruments.h"
#include "pycore_intrinsics.h"
#include "pycore_long.h" // _PyLong_GetZero()
-#include "pycore_instruments.h"
-#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_moduleobject.h" // PyModuleObject
+#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_opcode.h" // EXTRA_CASES
#include "pycore_opcode_metadata.h"
#include "pycore_opcode_utils.h" // MAKE_FUNCTION_*
#include "pycore_pyerrors.h" // _PyErr_GetRaisedException()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_range.h" // _PyRangeIterObject
+#include "pycore_setobject.h" // _PySet_Update()
#include "pycore_sliceobject.h" // _PyBuildSlice_ConsumeRefs
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "pycore_tuple.h" // _PyTuple_ITEMS()
#include "pycore_typeobject.h" // _PySuper_Lookup()
#include "pycore_uops.h" // _PyUOpExecutorObject
-#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#include "pycore_dict.h"
#include "dictobject.h"
diff --git a/Python/compile.c b/Python/compile.c
index 9a13ab5..6001187 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -28,12 +28,13 @@
#define NEED_OPCODE_TABLES
#include "pycore_opcode_utils.h"
#undef NEED_OPCODE_TABLES
-#include "pycore_flowgraph.h"
#include "pycore_code.h" // _PyCode_New()
#include "pycore_compile.h"
+#include "pycore_flowgraph.h"
#include "pycore_intrinsics.h"
#include "pycore_long.h" // _PyLong_GetZero()
#include "pycore_pystate.h" // _Py_GetConfig()
+#include "pycore_setobject.h" // _PySet_NextEntry()
#include "pycore_symtable.h" // PySTEntryObject, _PyFuture_FromAST()
#define NEED_OPCODE_METADATA
diff --git a/Python/executor.c b/Python/executor.c
index 1732252..57525df 100644
--- a/Python/executor.c
+++ b/Python/executor.c
@@ -11,6 +11,7 @@
#include "pycore_opcode_utils.h"
#include "pycore_pyerrors.h"
#include "pycore_range.h"
+#include "pycore_setobject.h" // _PySet_Update()
#include "pycore_sliceobject.h"
#include "pycore_uops.h"
diff --git a/Python/marshal.c b/Python/marshal.c
index 517220a..8940582 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -9,8 +9,9 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_code.h" // _PyCode_New()
-#include "pycore_long.h" // _PyLong_DigitCount
#include "pycore_hashtable.h" // _Py_hashtable_t
+#include "pycore_long.h" // _PyLong_DigitCount
+#include "pycore_setobject.h" // _PySet_NextEntry()
#include "marshal.h" // Py_MARSHAL_VERSION
/*[clinic input]
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index f91fac9..ceca777 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -24,6 +24,7 @@
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_runtime.h" // _Py_ID()
#include "pycore_runtime_init.h" // _PyRuntimeState_INIT
+#include "pycore_setobject.h" // _PySet_NextEntry()
#include "pycore_sliceobject.h" // _PySlice_Fini()
#include "pycore_sysmodule.h" // _PySys_ClearAuditHooks()
#include "pycore_traceback.h" // _Py_DumpTracebackThreads()