]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makes
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 17 Nov 2002 17:52:44 +0000 (17:52 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 17 Nov 2002 17:52:44 +0000 (17:52 +0000)
Py_Init crash".  refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.

Include/object.h
Objects/object.c
Python/pythonrun.c

index d045be16a0c75b2b99057a689fd16232783788a5..5e509b41a0f027111eda78aeb498501745d34221 100644 (file)
@@ -559,7 +559,6 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *);
 PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
 PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
 PyAPI_FUNC(void) _Py_PrintReferences(FILE *);
-PyAPI_FUNC(void) _Py_ResetReferences(void);
 
 #else
 /* Without Py_TRACE_REFS, there's little enough to do that we expand code
index 20a6a936c1c79a911684d7dda4fbd630a365f765..33286435e90b3e13e3c825f5d7b0cb041628a86f 100644 (file)
@@ -1908,13 +1908,6 @@ _Py_ReadyTypes(void)
 
 static PyObject refchain = {&refchain, &refchain};
 
-void
-_Py_ResetReferences(void)
-{
-       refchain._ob_prev = refchain._ob_next = &refchain;
-       _Py_RefTotal = 0;
-}
-
 void
 _Py_NewReference(PyObject *op)
 {
index b85c390a770214a022656af0b13bdb7498aa8526..c2508fa579da1a0e9a830a1141c0eef9bc36a70d 100644 (file)
@@ -277,10 +277,6 @@ Py_Finalize(void)
 #endif
 
        call_ll_exitfuncs();
-
-#ifdef Py_TRACE_REFS
-       _Py_ResetReferences();
-#endif /* Py_TRACE_REFS */
 }
 
 /* Create and initialize a new interpreter and thread, and return the