[Python-checkins] CVS: python/dist/src/Objects descrobject.c,1.1.2.14,1.1.2.15
Guido van Rossum
gvanrossum@users.sourceforge.net
Mon, 09 Jul 2001 11:47:14 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv30009
Modified Files:
Tag: descr-branch
descrobject.c
Log Message:
Allow None as the first argument to the tp_descr_get slot
(a.k.a. __get__).
Index: descrobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/Attic/descrobject.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -C2 -r1.1.2.14 -r1.1.2.15
*** descrobject.c 2001/07/09 18:11:56 1.1.2.14
--- descrobject.c 2001/07/09 18:47:12 1.1.2.15
***************
*** 94,98 ****
PyObject **pres)
{
! if (obj == NULL) {
Py_INCREF(descr);
*pres = (PyObject *)descr;
--- 94,98 ----
PyObject **pres)
{
! if (obj == NULL || obj == Py_None) {
Py_INCREF(descr);
*pres = (PyObject *)descr;