]> granicus.if.org Git - python/commitdiff
use the offical api
authorBenjamin Peterson <benjamin@python.org>
Thu, 4 Jun 2009 01:40:29 +0000 (01:40 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 4 Jun 2009 01:40:29 +0000 (01:40 +0000)
Objects/dictobject.c

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