Mercurial > cpython-lru_cache-weakref
diff Objects/classobject.c @ 17154:3b8a5bbfd2e5 legacy-trunk
A small change to the C API for weakly-referencable types: Such types
must now initialize the extra field used by the weak-ref machinery to
NULL themselves, to avoid having to require PyObject_INIT() to check
if the type supports weak references and do it there. This causes less
work to be done for all objects (the type object does not need to be
consulted to check for the Py_TPFLAGS_HAVE_WEAKREFS bit).
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 22 Mar 2001 18:26:47 +0000 |
| parents | d446e4ec9b7b |
| children | 962196ce7231 |
line wrap: on
line diff
