Commit 9afc4a99 authored by Fred Drake's avatar Fred Drake

PyFunction_Call() did not check the result of PyObject_Repr() for NULL, and

should just avoid calling it in the first place to avoid waiting for a repr
of a large object like a dict or list.  The result of PyObject_Repr() was
being leaked as well.
Bugfix candidate!
parent 19e850b1
...@@ -1660,8 +1660,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) ...@@ -1660,8 +1660,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
"NULL result without error in PyObject_Call"); "NULL result without error in PyObject_Call");
return result; return result;
} }
PyErr_Format(PyExc_TypeError, "object is not callable: %s", PyErr_Format(PyExc_TypeError, "'%s' object is not callable",
PyString_AS_STRING(PyObject_Repr(func))); func->ob_type->tp_name);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment