From: Neal Norwitz Date: Wed, 20 Nov 2002 02:38:10 +0000 (+0000) Subject: Backport Neil Schemenauer's fix for SF #529750, X-Git-Tag: v2.2.3c1~222 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76f485ff956ccba78e94e9d723e32a106b9dcd37;p=thirdparty%2FPython%2Fcpython.git Backport Neil Schemenauer's fix for SF #529750, Circular reference makes Py_Init crash Modified to keep _Py_ResetReferences() API, but make it a no-op. It's not called now (for 2.3 it was completely removed). --- diff --git a/Objects/object.c b/Objects/object.c index 51801d80a2c4..b14a9c07e8c2 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1784,8 +1784,6 @@ static PyObject refchain = {&refchain, &refchain}; void _Py_ResetReferences(void) { - refchain._ob_prev = refchain._ob_next = &refchain; - _Py_RefTotal = 0; } void diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 4b5cba585159..51d71e0da453 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -277,10 +277,6 @@ Py_Finalize(void) PyGrammar_RemoveAccelerators(&_PyParser_Grammar); call_ll_exitfuncs(); - -#ifdef Py_TRACE_REFS - _Py_ResetReferences(); -#endif /* Py_TRACE_REFS */ } /* Create and initialize a new interpreter and thread, and return the