Commit fd236aa1 authored by Stefan Behnel's avatar Stefan Behnel

allow globals() item assignments for now, even if it doesn't do anything useful

parent d1e82129
...@@ -106,7 +106,7 @@ static PyObject* __Pyx_Globals(); /*proto*/ ...@@ -106,7 +106,7 @@ static PyObject* __Pyx_Globals(); /*proto*/
impl = ''' impl = '''
static PyObject* __Pyx_Globals() { static PyObject* __Pyx_Globals() {
Py_ssize_t i; Py_ssize_t i;
PyObject *d; /*PyObject *d;*/
PyObject *names = NULL; PyObject *names = NULL;
PyObject *globals = PyObject_GetAttrString(%(MODULE)s, "__dict__"); PyObject *globals = PyObject_GetAttrString(%(MODULE)s, "__dict__");
if (!globals) { if (!globals) {
...@@ -130,9 +130,12 @@ static PyObject* __Pyx_Globals() { ...@@ -130,9 +130,12 @@ static PyObject* __Pyx_Globals() {
} }
} }
Py_DECREF(names); Py_DECREF(names);
return globals;
/*
d = PyDictProxy_New(globals); d = PyDictProxy_New(globals);
Py_DECREF(globals); Py_DECREF(globals);
return d; return d;
*/
bad: bad:
Py_XDECREF(names); Py_XDECREF(names);
Py_XDECREF(globals); Py_XDECREF(globals);
......
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