diff options
author | Guido van Rossum <guido@python.org> | 2003-04-15 15:12:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-04-15 15:12:39 (GMT) |
commit | 0fc8f00252d305a3a45ee8cf924e0b5d6be4472b (patch) | |
tree | 759ac5d7f6869ba8bf0fef8d3d1c43927b9e97ba /Objects | |
parent | 6fde1cef4aa2498f965f95c2d467f4b57face862 (diff) | |
download | cpython-0fc8f00252d305a3a45ee8cf924e0b5d6be4472b.zip cpython-0fc8f00252d305a3a45ee8cf924e0b5d6be4472b.tar.gz cpython-0fc8f00252d305a3a45ee8cf924e0b5d6be4472b.tar.bz2 |
- pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()
even farther down, to just before the call to
_PyObject_DebugMallocStats(). This required the following changes:
- pystate.c, PyThreadState_GetDict(): changed not to raise an
exception or issue a fatal error when no current thread state is
available, but simply return NULL without raising an exception
(ever).
- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
don't raise an exception but return 0. This means that when
printing a container that's recursive, printing will go on and on
and on. But that shouldn't happen in the case we care about (see
first bullet).
- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
PyThreadState_GetDict() definition.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index 1a1d1d2..c876219 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -2119,7 +2119,7 @@ Py_ReprEnter(PyObject *obj) dict = PyThreadState_GetDict(); if (dict == NULL) - return -1; + return 0; list = PyDict_GetItemString(dict, KEY); if (list == NULL) { list = PyList_New(0); |