mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-132775: Expand the Capability of Interpreter.call() (gh-133484)
It now supports most callables, full args, and return values.
This commit is contained in:
parent
eb145fabbd
commit
52deabefd0
10 changed files with 1259 additions and 303 deletions
|
@ -3964,8 +3964,10 @@ PyImport_Import(PyObject *module_name)
|
|||
if (globals != NULL) {
|
||||
Py_INCREF(globals);
|
||||
builtins = PyObject_GetItem(globals, &_Py_ID(__builtins__));
|
||||
if (builtins == NULL)
|
||||
if (builtins == NULL) {
|
||||
// XXX Fall back to interp->builtins or sys.modules['builtins']?
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* No globals -- use standard builtins, and fake globals */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue