[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.90,2.91
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 01 Nov 2001 12:26:14 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv656
Modified Files:
abstract.c
Log Message:
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!
Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.90
retrieving revision 2.91
diff -C2 -d -r2.90 -r2.91
*** abstract.c 2001/10/28 02:35:01 2.90
--- abstract.c 2001/11/01 20:26:12 2.91
***************
*** 1661,1666 ****
return result;
}
! PyErr_Format(PyExc_TypeError, "object is not callable: %s",
! PyString_AS_STRING(PyObject_Repr(func)));
return NULL;
}
--- 1661,1666 ----
return result;
}
! PyErr_Format(PyExc_TypeError, "'%s' object is not callable",
! func->ob_type->tp_name);
return NULL;
}