diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 2ae12c3..82aa668 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -184,10 +184,10 @@ static int pcall[PCALL_NUM]; PyObject * PyEval_GetCallStats(PyObject *self) { - return Py_BuildValue("iiiiiiiiii", + return Py_BuildValue("iiiiiiiiiii", pcall[0], pcall[1], pcall[2], pcall[3], pcall[4], pcall[5], pcall[6], pcall[7], - pcall[8], pcall[9]); + pcall[8], pcall[9], pcall[10]); } #else #define PCALL(O) @@ -4043,8 +4043,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) |