[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.16.8.9,2.16.8.10
Guido van Rossum
gvanrossum@users.sourceforge.net
2001年5月04日 14:56:55 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv22591
Modified Files:
Tag: descr-branch
typeobject.c
Log Message:
Produce a clearer error message from tp_call.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.16.8.9
retrieving revision 2.16.8.10
diff -C2 -r2.16.8.9 -r2.16.8.10
*** typeobject.c 2001年05月04日 17:09:38 2.16.8.9
--- typeobject.c 2001年05月04日 21:56:53 2.16.8.10
***************
*** 56,61 ****
char *dummy = NULL;
PyObject *obj, *res;
! if (!PyArg_ParseTupleAndKeywords(args, kwds, "", &dummy))
return NULL;
--- 56,63 ----
char *dummy = NULL;
PyObject *obj, *res;
+ char buffer[100];
! sprintf(buffer, ":<type '%.80s'>", type->tp_name);
! if (!PyArg_ParseTupleAndKeywords(args, kwds, buffer, &dummy))
return NULL;