mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add PyMethod_Function(), PyMethod_Self(), PyMethod_Class() back.
While not even documented, they were clearly part of the C API, there's no great difficulty to support them, and it has the cool effect of not requiring any changes to ExtensionClass.c.
This commit is contained in:
parent
a40c793d06
commit
b479dc561c
2 changed files with 34 additions and 0 deletions
|
@ -47,6 +47,10 @@ extern DL_IMPORT(PyObject *) PyInstance_New(PyObject *, PyObject *,
|
|||
extern DL_IMPORT(PyObject *) PyInstance_NewRaw(PyObject *, PyObject *);
|
||||
extern DL_IMPORT(PyObject *) PyMethod_New(PyObject *, PyObject *, PyObject *);
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyMethod_Function(PyObject *);
|
||||
extern DL_IMPORT(PyObject *) PyMethod_Self(PyObject *);
|
||||
extern DL_IMPORT(PyObject *) PyMethod_Class(PyObject *);
|
||||
|
||||
/* Macros for direct access to these values. Type checks are *not*
|
||||
done, so use with care. */
|
||||
#define PyMethod_GET_FUNCTION(meth) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue