diff options
author | Jeroen Demeyer <J.Demeyer@UGent.be> | 2019-06-14 12:37:15 +0200 |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-06-14 19:37:15 +0900 |
commit | b2f94730d947f25b8507c5f76202e917683e76f7 (patch) | |
tree | 893ba5034d461a8a1eae24fe95e29ffa5711c6cb | |
parent | 05f831865545b08c9a21cfb7773af58b76ec64cb (diff) | |
download | cpython-git-b2f94730d947f25b8507c5f76202e917683e76f7.tar.gz |
bpo-37249: add declaration of _PyObject_GetMethod (GH-14015)
-rw-r--r-- | Include/cpython/object.h | 3 | ||||
-rw-r--r-- | Objects/call.c | 3 | ||||
-rw-r--r-- | Python/ceval.c | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index a65aaf6482..fd4e77103f 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -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 *); diff --git a/Objects/call.c b/Objects/call.c index 578e1b3ab6..8eae1e10d8 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -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, ...) { diff --git a/Python/ceval.c b/Python/ceval.c index bb0416f4ce..60367a665d 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -38,10 +38,6 @@ # 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( |