From 76f485ff956ccba78e94e9d723e32a106b9dcd37 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 20 Nov 2002 02:38:10 +0000 Subject: 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). --- Objects/object.c | 2 -- Python/pythonrun.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/Objects/object.c b/Objects/object.c index 51801d8..b14a9c0 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 4b5cba5..51d71e0 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 -- cgit v0.12