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:
Eric Snow 2025-05-30 09:15:00 -06:00 committed by GitHub
parent eb145fabbd
commit 52deabefd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1259 additions and 303 deletions

View file

@ -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 */