Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2f9473

Browse files
jdemeyermethane
authored andcommitted
bpo-37249: add declaration of _PyObject_GetMethod (GH-14015)
1 parent 05f8318 commit b2f9473

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

Include/cpython/object.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ PyAPI_FUNC(int) _PyObject_HasAttrId(PyObject *, struct _Py_Identifier *);
318318
*/
319319
PyAPI_FUNC(int) _PyObject_LookupAttr(PyObject *, PyObject *, PyObject **);
320320
PyAPI_FUNC(int) _PyObject_LookupAttrId(PyObject *, struct _Py_Identifier *, PyObject **);
321+
322+
PyAPI_FUNC(int) _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
323+
321324
PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *);
322325
PyAPI_FUNC(PyObject *) _PyObject_NextNotImplemented(PyObject *);
323326
PyAPI_FUNC(void) PyObject_CallFinalizer(PyObject *);

Objects/call.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,9 +1211,6 @@ object_vacall(PyObject *base, PyObject *callable, va_list vargs)
12111211
}
12121212

12131213

1214-
/* Private API for the LOAD_METHOD opcode. */
1215-
extern int _PyObject_GetMethod(PyObject *, PyObject *, PyObject **);
1216-
12171214
PyObject *
12181215
PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...)
12191216
{

Python/ceval.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
# error "ceval.c must be build with Py_BUILD_CORE define for best performance"
3939
#endif
4040

41-
/* Private API for the LOAD_METHOD opcode. */
42-
extern int _PyObject_GetMethod(PyObject *, PyObject *, PyObject **);
43-
44-
typedef PyObject *(*callproc)(PyObject *, PyObject *, PyObject *);
4541

4642
/* Forward declarations */
4743
Py_LOCAL_INLINE(PyObject *) call_function(

0 commit comments

Comments
 (0)