[Python-checkins] CVS: python/dist/src/Objects classobject.c,2.137,2.138

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 17 Aug 2001 05:07:36 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv3272

Modified Files:
	classobject.c 
Log Message:
Instance methods: allow a NULL value for im_class.


Index: classobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v
retrieving revision 2.137
retrieving revision 2.138
diff -C2 -d -r2.137 -r2.138
*** classobject.c	2001/08/16 20:41:56	2.137
--- classobject.c	2001/08/17 12:07:34	2.138
***************
*** 1974,1978 ****
  	Py_XINCREF(self);
  	im->im_self = self;
! 	Py_INCREF(class);
  	im->im_class = class;
  	PyObject_GC_Init(im);
--- 1974,1978 ----
  	Py_XINCREF(self);
  	im->im_self = self;
! 	Py_XINCREF(class);
  	im->im_class = class;
  	PyObject_GC_Init(im);
***************
*** 2041,2045 ****
  	Py_DECREF(im->im_func);
  	Py_XDECREF(im->im_self);
! 	Py_DECREF(im->im_class);
  	im->im_self = (PyObject *)free_list;
  	free_list = im;
--- 2041,2045 ----
  	Py_DECREF(im->im_func);
  	Py_XDECREF(im->im_self);
! 	Py_XDECREF(im->im_class);
  	im->im_self = (PyObject *)free_list;
  	free_list = im;