PyWeakReference

PyWeakReference is the base struct for the Python ReferenceType, ProxyType, and CallableProxyType.

subclass of PyObject

Members

Mixins

__anonymous
mixin PyObject_HEAD
Undocumented in source.

Variables

hash
Py_hash_t hash;

A cache for wr_object's hash code. As usual for hashes, this is -1 if the hash code isn't known yet.

hash
C_long hash;
Undocumented in source.
wr_callback
PyObject* wr_callback;

A callable to invoke when wr_object dies, or NULL if none.

wr_next
PyWeakReference* wr_next;

If wr_object is weakly referenced, wr_object has a doubly-linked NULL- terminated list of weak references to it. These are the list pointers. If wr_object goes away, wr_object is set to Py_None, and these pointers have no meaning then.

wr_object
PyObject* wr_object;

The object to which this is a weak reference, or Py_None if none. Note that this is a stealth reference: wr_object's refcount is not incremented to reflect this pointer.

wr_prev
PyWeakReference* wr_prev;

If wr_object is weakly referenced, wr_object has a doubly-linked NULL- terminated list of weak references to it. These are the list pointers. If wr_object goes away, wr_object is set to Py_None, and these pointers have no meaning then.

Mixed In Members

From mixin PyObject_HEAD

__anonymous
mixin _PyObject_HEAD_EXTRA
Undocumented in source.
ob_refcnt
Py_ssize_t ob_refcnt;

_

ob_type
PyTypeObject* ob_type;

_

Meta