mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 02:10:27 +00:00
PyEval_EvalCode is just a wrapper
This commit is contained in:
parent
e043046e43
commit
a0c31d2ab6
1 changed files with 9 additions and 2 deletions
11
third_party/python/Python/import.c
vendored
11
third_party/python/Python/import.c
vendored
|
@ -2578,9 +2578,16 @@ static PyObject *SFLObject_exec_module(SourcelessFileLoader *self,
|
|||
if (_PyDict_GetItemId(globals, &PyId___builtins__) == NULL) {
|
||||
if (_PyDict_SetItemId(globals, &PyId___builtins__,
|
||||
PyEval_GetBuiltins()) != 0)
|
||||
return NULL;
|
||||
goto exit;
|
||||
}
|
||||
v = PyEval_EvalCode(code, globals, globals);
|
||||
v = _PyEval_EvalCodeWithName(code, globals, globals,
|
||||
(PyObject**)NULL, 0, // args, argcount
|
||||
(PyObject**)NULL, 0, // kwnames, kwargs,
|
||||
0, 2, // kwcount, kwstep
|
||||
(PyObject**)NULL, 0, // defs, defcount
|
||||
NULL, NULL, // kwdefs, closure
|
||||
NULL, NULL // name, qualname
|
||||
);
|
||||
if(v != NULL) {
|
||||
Py_DECREF(v);
|
||||
Py_RETURN_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue