Skip to content

Commit ae8407a

Browse files
committed
gh-106320: Remove _PyFunction_Vectorcall() API
Move _PyFunction_Vectorcall() API to the internal C API. No longer export the function.
1 parent 5e5a34a commit ae8407a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Include/cpython/funcobject.h

-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
7979
PyAPI_FUNC(PyObject *) PyFunction_GetAnnotations(PyObject *);
8080
PyAPI_FUNC(int) PyFunction_SetAnnotations(PyObject *, PyObject *);
8181

82-
PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
83-
PyObject *func,
84-
PyObject *const *stack,
85-
size_t nargsf,
86-
PyObject *kwnames);
87-
8882
#define _PyFunction_CAST(func) \
8983
(assert(PyFunction_Check(func)), _Py_CAST(PyFunctionObject*, func))
9084

Include/internal/pycore_function.h

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11+
extern PyObject* _PyFunction_Vectorcall(
12+
PyObject *func,
13+
PyObject *const *stack,
14+
size_t nargsf,
15+
PyObject *kwnames);
16+
1117
#define FUNC_MAX_WATCHERS 8
1218

1319
struct _py_func_state {

Objects/call.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "pycore_call.h" // _PyObject_CallNoArgsTstate()
33
#include "pycore_ceval.h" // _Py_EnterRecursiveCallTstate()
44
#include "pycore_dict.h" // _PyDict_FromItems()
5+
#include "pycore_function.h" // _PyFunction_Vectorcall() definition
56
#include "pycore_modsupport.h" // _Py_VaBuildStack()
67
#include "pycore_object.h" // _PyCFunctionWithKeywords_TrampolineCall()
78
#include "pycore_pyerrors.h" // _PyErr_Occurred()

0 commit comments

Comments
 (0)