[Python-checkins] CVS: python/dist/src/Include listobject.h,2.21,2.21.8.1

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 04 May 2001 10:12:56 -0700


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

Modified Files:
      Tag: descr-branch
	listobject.h 
Log Message:
Make lists subclassable.  Add code that frees ob_item when empty.

Index: listobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/listobject.h,v
retrieving revision 2.21
retrieving revision 2.21.8.1
diff -C2 -r2.21 -r2.21.8.1
*** listobject.h	2000/09/01 23:29:26	2.21
--- listobject.h	2001/05/04 17:12:53	2.21.8.1
***************
*** 27,31 ****
  extern DL_IMPORT(PyTypeObject) PyList_Type;
  
! #define PyList_Check(op) ((op)->ob_type == &PyList_Type)
  
  extern DL_IMPORT(PyObject *) PyList_New(int size);
--- 27,31 ----
  extern DL_IMPORT(PyTypeObject) PyList_Type;
  
! #define PyList_Check(op) PyObject_TypeCheck(op, &PyList_Type)
  
  extern DL_IMPORT(PyObject *) PyList_New(int size);