summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-07-21 14:16:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-07-21 14:16:13 (GMT)
commite5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe (patch)
treef34ab28a6f8777c5d78bb0bbb9e2bb68889ed63a /Objects
parentd98ef1a1accc9ac7213407be62f761ba3f7e106a (diff)
downloadcpython-e5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe.zip
cpython-e5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe.tar.gz
cpython-e5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe.tar.bz2
Merged revisions 74140 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74140 | benjamin.peterson | 2009-07-21 09:11:27 -0500 (Tue, 21 Jul 2009) | 9 lines Merged revisions 74139 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line must use _PyThreadState_Current so it isn't checked for NULL #6530 ........ ................
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index ce6760f..907ccf2 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -714,10 +714,12 @@ PyDict_GetItem(PyObject *op, PyObject *key)
}
}
- /* We can arrive here with a NULL tstate during initialization:
- try running "python -Wi" for an example related to string
- interning. Let's just hope that no exception occurs then... */
- tstate = PyThreadState_GET();
+ /* We can arrive here with a NULL tstate during initialization: try
+ running "python -Wi" for an example related to string interning.
+ Let's just hope that no exception occurs then... This must be
+ _PyThreadState_Current and not PyThreadState_GET() because in debug
+ mode, it complains if tstate is NULL. */
+ tstate = _PyThreadState_Current;
if (tstate != NULL && tstate->curexc_type != NULL) {
/* preserve the existing exception */
PyObject *err_type, *err_value, *err_tb;