[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.16.8.6,2.16.8.7
Guido van Rossum
gvanrossum@users.sourceforge.net
2001年4月30日 08:54:24 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv14955
Modified Files:
Tag: descr-branch
typeobject.c
Log Message:
The __pow__ wrapper should make the third argument optional.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.16.8.6
retrieving revision 2.16.8.7
diff -C2 -r2.16.8.6 -r2.16.8.7
*** typeobject.c 2001年04月30日 14:27:03 2.16.8.6
--- typeobject.c 2001年04月30日 15:54:21 2.16.8.7
***************
*** 323,329 ****
{
ternaryfunc func = (ternaryfunc)wrapped;
! PyObject *other, *third;
! if (!PyArg_ParseTuple(args, "OO", &other, &third))
return NULL;
return (*func)(self, other, third);
--- 323,332 ----
{
ternaryfunc func = (ternaryfunc)wrapped;
! PyObject *other;
! PyObject *third = Py_None;
! /* Note: This wrapper only works for __pow__() */
!
! if (!PyArg_ParseTuple(args, "O|O", &other, &third))
return NULL;
return (*func)(self, other, third);