From: Stefan Behnel Date: Wed, 1 May 2013 12:03:40 +0000 (+0200) Subject: use pre-instantiated identifier string when looking up or setting the vtable of expor... X-Git-Tag: 0.19.1~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=749249574690c227db1931c5319c36c606fbcb84;p=platform%2Fupstream%2Fpython-cython.git use pre-instantiated identifier string when looking up or setting the vtable of exported/imported extension types --- diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c index f05f043..0dde7b8 100644 --- a/Cython/Utility/ExtensionTypes.c +++ b/Cython/Utility/ExtensionTypes.c @@ -67,7 +67,7 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #endif if (!ob) goto bad; - if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) + if (PyDict_SetItem(dict, PYIDENT("__pyx_vtable__"), ob) < 0) goto bad; Py_DECREF(ob); return 0; @@ -84,7 +84,7 @@ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; - PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); + PyObject *ob = PyObject_GetItem(dict, PYIDENT("__pyx_vtable__")); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)