Commit 27b95023 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Fix annoying C++ warning from PyMapping_Keys() in Py2.x

parent c9765a85
...@@ -2754,7 +2754,11 @@ __Pyx_import_all_from(PyObject *locals, PyObject *v) ...@@ -2754,7 +2754,11 @@ __Pyx_import_all_from(PyObject *locals, PyObject *v)
"from-import-* object has no __dict__ and no __all__"); "from-import-* object has no __dict__ and no __all__");
return -1; return -1;
} }
#if PY_MAJOR_VERSION < 3
all = PyObject_CallMethod(dict, (char *)"keys", NULL);
#else
all = PyMapping_Keys(dict); all = PyMapping_Keys(dict);
#endif
Py_DECREF(dict); Py_DECREF(dict);
if (all == NULL) if (all == NULL)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment