bpo-37151: remove _PyCFunction_FastCallDict (GH-14269)
authorJeroen Demeyer <J.Demeyer@UGent.be>
Thu, 20 Jun 2019 15:38:46 +0000 (17:38 +0200)
committerInada Naoki <songofacandy@gmail.com>
Thu, 20 Jun 2019 15:38:45 +0000 (00:38 +0900)
Include/methodobject.h
Objects/call.c
Python/ceval.c
Tools/gdb/libpython.py

index e92adde7bf6bd7f4fa4edff51e0d10c48d611484..f4a6682830c3f01b4b6c1b78532f12e81c5f602a 100644 (file)
@@ -42,11 +42,6 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
 PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
 
 #ifndef Py_LIMITED_API
-PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
-    PyObject *const *args,
-    Py_ssize_t nargs,
-    PyObject *kwargs);
-
 PyAPI_FUNC(PyObject *) _PyCFunction_Vectorcall(PyObject *func,
     PyObject *const *stack,
     size_t nargsf,
index 75dbd6f52623acd3ede0a1dfdc23694ef4c6f1bf..8a1ce7f55fe4f0d4d2521c4b75119e11c5c80604 100644 (file)
@@ -495,24 +495,6 @@ exit:
 }
 
 
-PyObject *
-_PyCFunction_FastCallDict(PyObject *func,
-                          PyObject *const *args, Py_ssize_t nargs,
-                          PyObject *kwargs)
-{
-    PyObject *result;
-
-    assert(func != NULL);
-    assert(PyCFunction_Check(func));
-
-    result = _PyMethodDef_RawFastCallDict(((PyCFunctionObject*)func)->m_ml,
-                                          PyCFunction_GET_SELF(func),
-                                          args, nargs, kwargs);
-    result = _Py_CheckFunctionResult(func, result, NULL);
-    return result;
-}
-
-
 PyObject *
 _PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self,
                                  PyObject *const *args, Py_ssize_t nargs,
index 60367a665d7d623cb4f8e2515c88fbf52eb365da..4ca986a94517f23cde0b3241d41cd122219f0956 100644 (file)
@@ -5018,10 +5018,10 @@ do_call_core(PyThreadState *tstate, PyObject *func, PyObject *callargs, PyObject
                 return NULL;
             }
 
-            C_TRACE(result, _PyCFunction_FastCallDict(func,
-                                                      &_PyTuple_ITEMS(callargs)[1],
-                                                      nargs - 1,
-                                                      kwdict));
+            C_TRACE(result, _PyObject_FastCallDict(func,
+                                                   &_PyTuple_ITEMS(callargs)[1],
+                                                   nargs - 1,
+                                                   kwdict));
             Py_DECREF(func);
             return result;
         }
index 93f720ab7e2a100638f5126e21f78f4099d0b59d..abfea964a3d4f8be7c49cf0d05f6d152d377f646 100755 (executable)
@@ -1563,8 +1563,7 @@ class Frame(object):
         if not caller:
             return False
 
-        if caller in ('_PyCFunction_FastCallDict',
-                      '_PyCFunction_Vectorcall',
+        if caller in ('_PyCFunction_Vectorcall',
                       'cfunction_call_varargs'):
             arg_name = 'func'
             # Within that frame: