return NULL;
}
+ assert(tstate != NULL);
assert(globals != NULL);
f = PyFrame_New(tstate, co, globals, locals);
if (f == NULL)
PyFrame_New() that doesn't take locals, but does
take builtins without sanity checking them.
*/
+ assert(tstate != NULL);
f = PyFrame_New(tstate, co, globals, NULL);
if (f == NULL)
return NULL;
fastlocals[i] = *stack++;
}
retval = PyEval_EvalFrameEx(f,0);
- assert(tstate != NULL);
++tstate->recursion_depth;
Py_DECREF(f);
--tstate->recursion_depth;
locals = PyEval_GetLocals();
plain = 1;
}
+ if (!globals || !locals) {
+ PyErr_SetString(PyExc_SystemError,
+ "globals and locals cannot be NULL");
+ return -1;
+ }
}
else if (locals == Py_None)
locals = globals;