mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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!
This commit is contained in:
parent
d2364e8e2d
commit
573395a7a8
1 changed files with 2 additions and 2 deletions
|
|
@ -1660,8 +1660,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
|
|||
"NULL result without error in PyObject_Call");
|
||||
return result;
|
||||
}
|
||||
PyErr_Format(PyExc_TypeError, "object is not callable: %s",
|
||||
PyString_AS_STRING(PyObject_Repr(func)));
|
||||
PyErr_Format(PyExc_TypeError, "'%s' object is not callable",
|
||||
func->ob_type->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue