]> granicus.if.org Git - python/commitdiff
SF bug #1503294.
authorArmin Rigo <arigo@tunes.org>
Sat, 10 Jun 2006 10:57:40 +0000 (10:57 +0000)
committerArmin Rigo <arigo@tunes.org>
Sat, 10 Jun 2006 10:57:40 +0000 (10:57 +0000)
PyThreadState_GET() complains if the tstate is NULL, but only in debug mode.

Objects/dictobject.c

index f9e45fd86242bd62383afd77d215ef0342079b33..c02f1b2679c9a5ba843944643d3e8ece98326ece 100644 (file)
@@ -561,7 +561,7 @@ 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();
+       tstate = _PyThreadState_Current;
        if (tstate != NULL && tstate->curexc_type != NULL) {
                /* preserve the existing exception */
                PyObject *err_type, *err_value, *err_tb;