[Python-checkins] python/dist/src/Objects object.c,2.206,2.207
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
2003年4月15日 08:11:26 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv28051/Objects
Modified Files:
object.c
Log Message:
- 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.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.206
retrieving revision 2.207
diff -C2 -d -r2.206 -r2.207
*** object.c 23 Mar 2003 18:06:08 -0000 2.206
--- object.c 15 Apr 2003 15:10:51 -0000 2.207
***************
*** 2120,2124 ****
dict = PyThreadState_GetDict();
if (dict == NULL)
! return -1;
list = PyDict_GetItemString(dict, KEY);
if (list == NULL) {
--- 2120,2124 ----
dict = PyThreadState_GetDict();
if (dict == NULL)
! return 0;
list = PyDict_GetItemString(dict, KEY);
if (list == NULL) {