mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add the necessary field for weak reference support to the function and
method types.
This commit is contained in:
parent
4131830c23
commit
6a1c87ddf9
2 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ typedef struct {
|
||||||
PyObject *im_func; /* The callable object implementing the method */
|
PyObject *im_func; /* The callable object implementing the method */
|
||||||
PyObject *im_self; /* The instance it is bound to, or NULL */
|
PyObject *im_self; /* The instance it is bound to, or NULL */
|
||||||
PyObject *im_class; /* The class that defined the method */
|
PyObject *im_class; /* The class that defined the method */
|
||||||
|
PyObject *im_weakreflist; /* List of weak references */
|
||||||
} PyMethodObject;
|
} PyMethodObject;
|
||||||
|
|
||||||
extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
|
extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
|
||||||
|
|
|
@ -16,6 +16,7 @@ typedef struct {
|
||||||
PyObject *func_doc;
|
PyObject *func_doc;
|
||||||
PyObject *func_name;
|
PyObject *func_name;
|
||||||
PyObject *func_dict;
|
PyObject *func_dict;
|
||||||
|
PyObject *func_weakreflist;
|
||||||
} PyFunctionObject;
|
} PyFunctionObject;
|
||||||
|
|
||||||
extern DL_IMPORT(PyTypeObject) PyFunction_Type;
|
extern DL_IMPORT(PyTypeObject) PyFunction_Type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue