Issue #22116: C functions and methods (of the 'builtin_function_or_method' type) can now be weakref'ed. Patch by Wei Wu.

This commit is contained in:
Antoine Pitrou 2014-08-06 19:31:40 -04:00
parent f3440c6881
commit b349e4c929
7 changed files with 39 additions and 2 deletions

View file

@ -77,6 +77,7 @@ typedef struct {
PyMethodDef *m_ml; /* Description of the C function to call */
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
PyObject *m_module; /* The __module__ attribute, can be anything */
PyObject *m_weakreflist; /* List of weak references */
} PyCFunctionObject;
#endif