diff options
Diffstat (limited to 'Include/weakrefobject.h')
-rw-r--r-- | Include/weakrefobject.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Include/weakrefobject.h b/Include/weakrefobject.h index 1705156..e7c0eae 100644 --- a/Include/weakrefobject.h +++ b/Include/weakrefobject.h @@ -12,7 +12,6 @@ typedef struct _PyWeakReference PyWeakReference; /* PyWeakReference is the base struct for the Python ReferenceType, ProxyType, * and CallableProxyType. */ -#ifndef Py_LIMITED_API struct _PyWeakReference { PyObject_HEAD @@ -28,7 +27,7 @@ struct _PyWeakReference { /* A cache for wr_object's hash code. As usual for hashes, this is -1 * if the hash code isn't known yet. */ - Py_hash_t hash; + long hash; /* 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. @@ -38,7 +37,6 @@ struct _PyWeakReference { PyWeakReference *wr_prev; PyWeakReference *wr_next; }; -#endif PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; @@ -61,11 +59,9 @@ 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 /* Explanation for the Py_REFCNT() check: when a weakref's target is part of a long chain of deallocations which triggers the trashcan mechanism, |