]> granicus.if.org Git - python/commitdiff
bpo-37249: add declaration of _PyObject_GetMethod (GH-14015)
authorJeroen Demeyer <J.Demeyer@UGent.be>
Fri, 14 Jun 2019 10:37:15 +0000 (12:37 +0200)
committerInada Naoki <songofacandy@gmail.com>
Fri, 14 Jun 2019 10:37:15 +0000 (19:37 +0900)
Include/cpython/object.h
Objects/call.c
Python/ceval.c

index a65aaf6482159cad2c65e8fb67c64de6350b82e9..fd4e77103f01b82e2647a1cbe5b1984184748325 100644 (file)
@@ -318,6 +318,9 @@ PyAPI_FUNC(int) _PyObject_HasAttrId(PyObject *, struct _Py_Identifier *);
 */
 PyAPI_FUNC(int) _PyObject_LookupAttr(PyObject *, PyObject *, PyObject **);
 PyAPI_FUNC(int) _PyObject_LookupAttrId(PyObject *, struct _Py_Identifier *, PyObject **);
+
+PyAPI_FUNC(int) _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
+
 PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *);
 PyAPI_FUNC(PyObject *) _PyObject_NextNotImplemented(PyObject *);
 PyAPI_FUNC(void) PyObject_CallFinalizer(PyObject *);
index 578e1b3ab619332eec200ec8149cfe9bdd2d654d..8eae1e10d8c556407e5d5fa3ba70f547fb85bf16 100644 (file)
@@ -1211,9 +1211,6 @@ object_vacall(PyObject *base, PyObject *callable, va_list vargs)
 }
 
 
-/* Private API for the LOAD_METHOD opcode. */
-extern int _PyObject_GetMethod(PyObject *, PyObject *, PyObject **);
-
 PyObject *
 PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...)
 {
index bb0416f4cebacf68e2b2dd99854c0eca1fce4cde..60367a665d7d623cb4f8e2515c88fbf52eb365da 100644 (file)
 #  error "ceval.c must be build with Py_BUILD_CORE define for best performance"
 #endif
 
-/* Private API for the LOAD_METHOD opcode. */
-extern int _PyObject_GetMethod(PyObject *, PyObject *, PyObject **);
-
-typedef PyObject *(*callproc)(PyObject *, PyObject *, PyObject *);
 
 /* Forward declarations */
 Py_LOCAL_INLINE(PyObject *) call_function(