mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
@ -12,6 +12,7 @@ typedef struct _PyWeakReference PyWeakReference;
|
|||
/* PyWeakReference is the base struct for the Python ReferenceType, ProxyType,
|
||||
* and CallableProxyType.
|
||||
*/
|
||||
#ifndef Py_LIMITED_API
|
||||
struct _PyWeakReference {
|
||||
PyObject_HEAD
|
||||
|
||||
|
@ -37,6 +38,7 @@ struct _PyWeakReference {
|
|||
PyWeakReference *wr_prev;
|
||||
PyWeakReference *wr_next;
|
||||
};
|
||||
#endif
|
||||
|
||||
PyAPI_DATA(PyTypeObject) _PyWeakref_RefType;
|
||||
PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType;
|
||||
|
@ -62,9 +64,11 @@ PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob,
|
|||
PyObject *callback);
|
||||
PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(Py_ssize_t) _PyWeakref_GetWeakrefCount(PyWeakReference *head);
|
||||
|
||||
PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference *self);
|
||||
#endif
|
||||
|
||||
#define PyWeakref_GET_OBJECT(ref) (((PyWeakReference *)(ref))->wr_object)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue