Skip to content

Commit 37788bc

Browse files
jdemeyerencukou
authored andcommitted
bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)
1 parent 6d0b747 commit 37788bc

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

Include/descrobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
9292
struct PyGetSetDef *);
9393
#ifndef Py_LIMITED_API
9494

95-
PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords(
95+
PyAPI_FUNC(PyObject *) _PyMethodDescr_Vectorcall(
9696
PyObject *descrobj, PyObject *const *args, size_t nargsf, PyObject *kwnames);
9797
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
9898
struct wrapperbase *, void *);

Include/funcobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
6666
Py_ssize_t nargs,
6767
PyObject *kwargs);
6868

69-
PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords(
69+
PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
7070
PyObject *func,
7171
PyObject *const *stack,
7272
size_t nargsf,

Include/methodobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
4747
Py_ssize_t nargs,
4848
PyObject *kwargs);
4949

50-
PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func,
50+
PyAPI_FUNC(PyObject *) _PyCFunction_Vectorcall(PyObject *func,
5151
PyObject *const *stack,
5252
size_t nargsf,
5353
PyObject *kwnames);

Objects/call.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs
374374

375375

376376
PyObject *
377-
_PyFunction_FastCallKeywords(PyObject *func, PyObject* const* stack,
378-
size_t nargsf, PyObject *kwnames)
377+
_PyFunction_Vectorcall(PyObject *func, PyObject* const* stack,
378+
size_t nargsf, PyObject *kwnames)
379379
{
380380
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
381381
PyObject *globals = PyFunction_GET_GLOBALS(func);
@@ -714,9 +714,9 @@ _PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self,
714714

715715

716716
PyObject *
717-
_PyCFunction_FastCallKeywords(PyObject *func,
718-
PyObject *const *args, size_t nargsf,
719-
PyObject *kwnames)
717+
_PyCFunction_Vectorcall(PyObject *func,
718+
PyObject *const *args, size_t nargsf,
719+
PyObject *kwnames)
720720
{
721721
PyObject *result;
722722

Objects/descrobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs)
264264

265265
// same to methoddescr_call(), but use FASTCALL convention.
266266
PyObject *
267-
_PyMethodDescr_FastCallKeywords(PyObject *descrobj,
268-
PyObject *const *args, size_t nargsf,
269-
PyObject *kwnames)
267+
_PyMethodDescr_Vectorcall(PyObject *descrobj,
268+
PyObject *const *args, size_t nargsf,
269+
PyObject *kwnames)
270270
{
271271
assert(Py_TYPE(descrobj) == &PyMethodDescr_Type);
272272
PyMethodDescrObject *descr = (PyMethodDescrObject *)descrobj;
@@ -756,7 +756,7 @@ PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method)
756756
type, method->ml_name);
757757
if (descr != NULL) {
758758
descr->d_method = method;
759-
descr->vectorcall = &_PyMethodDescr_FastCallKeywords;
759+
descr->vectorcall = _PyMethodDescr_Vectorcall;
760760
}
761761
return (PyObject *)descr;
762762
}

Objects/funcobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname
3636
op->func_defaults = NULL; /* No default arguments */
3737
op->func_kwdefaults = NULL; /* No keyword only defaults */
3838
op->func_closure = NULL;
39-
op->vectorcall = _PyFunction_FastCallKeywords;
39+
op->vectorcall = _PyFunction_Vectorcall;
4040

4141
consts = ((PyCodeObject *)code)->co_consts;
4242
if (PyTuple_Size(consts) >= 1) {

Objects/methodobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
5252
op->vectorcall = NULL;
5353
}
5454
else {
55-
op->vectorcall = &_PyCFunction_FastCallKeywords;
55+
op->vectorcall = _PyCFunction_Vectorcall;
5656
}
5757
_PyObject_GC_TRACK(op);
5858
return (PyObject *)op;

Python/ceval.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4815,7 +4815,7 @@ trace_call_function(PyThreadState *tstate,
48154815
{
48164816
PyObject *x;
48174817
if (PyCFunction_Check(func)) {
4818-
C_TRACE(x, _PyCFunction_FastCallKeywords(func, args, nargs, kwnames));
4818+
C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames));
48194819
return x;
48204820
}
48214821
else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
@@ -4831,9 +4831,9 @@ trace_call_function(PyThreadState *tstate,
48314831
if (func == NULL) {
48324832
return NULL;
48334833
}
4834-
C_TRACE(x, _PyCFunction_FastCallKeywords(func,
4835-
args+1, nargs-1,
4836-
kwnames));
4834+
C_TRACE(x, _PyCFunction_Vectorcall(func,
4835+
args+1, nargs-1,
4836+
kwnames));
48374837
Py_DECREF(func);
48384838
return x;
48394839
}

Tools/gdb/libpython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ def is_other_python_frame(self):
15641564
return False
15651565

15661566
if caller in ('_PyCFunction_FastCallDict',
1567-
'_PyCFunction_FastCallKeywords',
1567+
'_PyCFunction_Vectorcall',
15681568
'cfunction_call_varargs'):
15691569
arg_name = 'func'
15701570
# Within that frame:

0 commit comments

Comments
 (0)