]> granicus.if.org Git - python/commitdiff
bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)
authorJeroen Demeyer <J.Demeyer@UGent.be>
Thu, 30 May 2019 13:11:22 +0000 (15:11 +0200)
committerPetr Viktorin <encukou@gmail.com>
Thu, 30 May 2019 13:11:22 +0000 (15:11 +0200)
Include/descrobject.h
Include/funcobject.h
Include/methodobject.h
Objects/call.c
Objects/descrobject.c
Objects/funcobject.c
Objects/methodobject.c
Python/ceval.c
Tools/gdb/libpython.py

index 3db09635399cc24c9cf201d087981334a1a42757..d7114852c1e210d5713f41dc3e34d2f5684dd724 100644 (file)
@@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
                                                struct PyGetSetDef *);
 #ifndef Py_LIMITED_API
 
-PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords(
+PyAPI_FUNC(PyObject *) _PyMethodDescr_Vectorcall(
         PyObject *descrobj, PyObject *const *args, size_t nargsf, PyObject *kwnames);
 PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
                                                 struct wrapperbase *, void *);
index 7ba000e1f13cc2b4497d6378b2984c2f9fedd9ff..e563a74a15b6e182a99bdc7bb276b4a660c9f6c6 100644 (file)
@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
     Py_ssize_t nargs,
     PyObject *kwargs);
 
-PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords(
+PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
     PyObject *func,
     PyObject *const *stack,
     size_t nargsf,
index 5dbe2145dadc3987b6c4eadb172404fa97499dd3..e92adde7bf6bd7f4fa4edff51e0d10c48d611484 100644 (file)
@@ -47,7 +47,7 @@ PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
     Py_ssize_t nargs,
     PyObject *kwargs);
 
-PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func,
+PyAPI_FUNC(PyObject *) _PyCFunction_Vectorcall(PyObject *func,
     PyObject *const *stack,
     size_t nargsf,
     PyObject *kwnames);
index 55dfc520f1deb1bd6732083ae4042c3af1e73e26..acd1f26dcbb576fcdb6c1e874bc12fb17d8c3f56 100644 (file)
@@ -374,8 +374,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs
 
 
 PyObject *
-_PyFunction_FastCallKeywords(PyObject *func, PyObject* const* stack,
-                             size_t nargsf, PyObject *kwnames)
+_PyFunction_Vectorcall(PyObject *func, PyObject* const* stack,
+                       size_t nargsf, PyObject *kwnames)
 {
     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
     PyObject *globals = PyFunction_GET_GLOBALS(func);
@@ -714,9 +714,9 @@ exit:
 
 
 PyObject *
-_PyCFunction_FastCallKeywords(PyObject *func,
-                              PyObject *const *args, size_t nargsf,
-                              PyObject *kwnames)
+_PyCFunction_Vectorcall(PyObject *func,
+                        PyObject *const *args, size_t nargsf,
+                        PyObject *kwnames)
 {
     PyObject *result;
 
index 759018503c65e00bba3ea687e36335fcb295859c..3aaeaa6e890fdf48a010111bceca396959006df3 100644 (file)
@@ -264,9 +264,9 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs)
 
 // same to methoddescr_call(), but use FASTCALL convention.
 PyObject *
-_PyMethodDescr_FastCallKeywords(PyObject *descrobj,
-                                PyObject *const *args, size_t nargsf,
-                                PyObject *kwnames)
+_PyMethodDescr_Vectorcall(PyObject *descrobj,
+                          PyObject *const *args, size_t nargsf,
+                          PyObject *kwnames)
 {
     assert(Py_TYPE(descrobj) == &PyMethodDescr_Type);
     PyMethodDescrObject *descr = (PyMethodDescrObject *)descrobj;
@@ -756,7 +756,7 @@ PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method)
                                              type, method->ml_name);
     if (descr != NULL) {
         descr->d_method = method;
-        descr->vectorcall = &_PyMethodDescr_FastCallKeywords;
+        descr->vectorcall = _PyMethodDescr_Vectorcall;
     }
     return (PyObject *)descr;
 }
index 2b1f42db746dbcd3a006829e3e946a65a6397d23..6f5b5d223d9be0c52cf16eb2398c10f3fc19b5dd 100644 (file)
@@ -36,7 +36,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname
     op->func_defaults = NULL; /* No default arguments */
     op->func_kwdefaults = NULL; /* No keyword only defaults */
     op->func_closure = NULL;
-    op->vectorcall = _PyFunction_FastCallKeywords;
+    op->vectorcall = _PyFunction_Vectorcall;
 
     consts = ((PyCodeObject *)code)->co_consts;
     if (PyTuple_Size(consts) >= 1) {
index 76497c93894a897567076e04fc784530a816a907..544baee09113ab29f9f5e7f5af44411e623854cf 100644 (file)
@@ -52,7 +52,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
         op->vectorcall = NULL;
     }
     else {
-        op->vectorcall = &_PyCFunction_FastCallKeywords;
+        op->vectorcall = _PyCFunction_Vectorcall;
     }
     _PyObject_GC_TRACK(op);
     return (PyObject *)op;
index 47baa4d03ed9cc480cfeba58f97b424fe06cac69..71e6eb8ebcfd3efd83b650e61af1c2116d296703 100644 (file)
@@ -4815,7 +4815,7 @@ trace_call_function(PyThreadState *tstate,
 {
     PyObject *x;
     if (PyCFunction_Check(func)) {
-        C_TRACE(x, _PyCFunction_FastCallKeywords(func, args, nargs, kwnames));
+        C_TRACE(x, _PyCFunction_Vectorcall(func, args, nargs, kwnames));
         return x;
     }
     else if (Py_TYPE(func) == &PyMethodDescr_Type && nargs > 0) {
@@ -4831,9 +4831,9 @@ trace_call_function(PyThreadState *tstate,
         if (func == NULL) {
             return NULL;
         }
-        C_TRACE(x, _PyCFunction_FastCallKeywords(func,
-                                                 args+1, nargs-1,
-                                                 kwnames));
+        C_TRACE(x, _PyCFunction_Vectorcall(func,
+                                           args+1, nargs-1,
+                                           kwnames));
         Py_DECREF(func);
         return x;
     }
index d49546fa9c46dbb207312fd10c2109e7cabfde63..93f720ab7e2a100638f5126e21f78f4099d0b59d 100755 (executable)
@@ -1564,7 +1564,7 @@ class Frame(object):
             return False
 
         if caller in ('_PyCFunction_FastCallDict',
-                      '_PyCFunction_FastCallKeywords',
+                      '_PyCFunction_Vectorcall',
                       'cfunction_call_varargs'):
             arg_name = 'func'
             # Within that frame: