summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-26 02:05:17 (GMT)
committerGitHub <noreply@github.com>2023-08-26 02:05:17 (GMT)
commit8ba47146111d714c7b61825d43b52311d9be366d (patch)
tree061438cacfecebab0264ef41fb94e11a40431924 /Python
parent6353c21b78a3d91e7cd7810f1c00258a34e85fe7 (diff)
downloadcpython-8ba47146111d714c7b61825d43b52311d9be366d.zip
cpython-8ba47146111d714c7b61825d43b52311d9be366d.tar.gz
cpython-8ba47146111d714c7b61825d43b52311d9be366d.tar.bz2
gh-106320: Remove private AC converter functions (#108505)
Move these private functions to the internal C API (pycore_abstract.h): * _Py_convert_optional_to_ssize_t() * _PyNumber_Index() Argument Clinic now emits #include "pycore_abstract.h" when these functions are used. The parser of the c-analyzer tool now uses a list of files which use the limited C API, rather than a list of files using the internal C API.
Diffstat (limited to 'Python')
-rw-r--r--Python/clinic/_warnings.c.h3
-rw-r--r--Python/getargs.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h
index b39e412..1a01416 100644
--- a/Python/clinic/_warnings.c.h
+++ b/Python/clinic/_warnings.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_abstract.h" // _PyNumber_Index()
PyDoc_STRVAR(warnings_warn__doc__,
"warn($module, /, message, category=None, stacklevel=1, source=None, *,\n"
@@ -243,4 +244,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return warnings_filters_mutated_impl(module);
}
-/*[clinic end generated code: output=0e2b367a662bf51b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c8a6dc1403fba1d5 input=a9049054013a1b77]*/
diff --git a/Python/getargs.c b/Python/getargs.c
index 809b2d4..fdc1444 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2,6 +2,7 @@
/* New getargs implementation */
#include "Python.h"
+#include "pycore_abstract.h" // _PyNumber_Index()
#include "pycore_dict.h" // _PyDict_HasOnlyStringKeys()
#include "pycore_pylifecycle.h" // _PyArg_Fini
#include "pycore_tuple.h" // _PyTuple_ITEMS()