micro optimisation in globals()
authorStefan Behnel <stefan_ml@behnel.de>
Fri, 26 Jul 2013 09:02:07 +0000 (11:02 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Fri, 26 Jul 2013 09:02:07 +0000 (11:02 +0200)
Cython/Utility/Builtins.c

index 489300b..814177a 100644 (file)
@@ -12,6 +12,7 @@ static PyObject* __Pyx_Globals(void); /*proto*/
 
 //////////////////// Globals ////////////////////
 //@substitute: naming
+//@requires: ObjectHandling.c::GetAttr
 
 // This is a stub implementation until we have something more complete.
 // Currently, we only handle the most common case of a read-only dict
@@ -40,7 +41,7 @@ static PyObject* __Pyx_Globals(void) {
         PyObject* name = PyList_GET_ITEM(names, i);
 #endif
         if (!PyDict_Contains(globals, name)) {
-            PyObject* value = PyObject_GetAttr($module_cname, name);
+            PyObject* value = __Pyx_GetAttr($module_cname, name);
             if (!value) {
 #if CYTHON_COMPILING_IN_PYPY
                 Py_DECREF(name);