aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/clinic/bltinmodule.c.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-17 14:30:31 +0200
committerGitHub <noreply@github.com>2023-10-17 14:30:31 +0200
commitbe5e8a010341c4d2d28ef53a1baed402ee06466e (patch)
tree6372a45676c7d5b8d07c69b67e889bbaf8f307e1 /Python/clinic/bltinmodule.c.h
parent054f496bd45cf94eac4158fd60ac95ab5f8e45c4 (diff)
downloadcpython-be5e8a010341c4d2d28ef53a1baed402ee06466e.tar.gz
cpython-be5e8a010341c4d2d28ef53a1baed402ee06466e.zip
gh-110964: Remove private _PyArg functions (#110966)
Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
Diffstat (limited to 'Python/clinic/bltinmodule.c.h')
-rw-r--r--Python/clinic/bltinmodule.c.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index b4dcc6bf1d2..8d40e659b54 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(builtin___import____doc__,
"__import__($module, /, name, globals=None, locals=None, fromlist=(),\n"
@@ -1211,4 +1212,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=607c62f2341ebfc0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=31bded5d08647a57 input=a9049054013a1b77]*/