mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Backport of r52862.
This commit is contained in:
@@ -4073,8 +4073,10 @@ import_all_from(PyObject *locals, PyObject *v)
|
||||
value = PyObject_GetAttr(v, name);
|
||||
if (value == NULL)
|
||||
err = -1;
|
||||
else
|
||||
else if (PyDict_CheckExact(locals))
|
||||
err = PyDict_SetItem(locals, name, value);
|
||||
else
|
||||
err = PyObject_SetItem(locals, name, value);
|
||||
Py_DECREF(name);
|
||||
Py_XDECREF(value);
|
||||
if (err != 0)
|
||||
|
||||
Reference in New Issue
Block a user