[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.40,2.41 object.c,2.86,2.87

Jeremy Hylton python-dev@python.org
Wed, 12 Jul 2000 05:56:21 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Objects

Modified Files:
	abstract.c object.c 
Log Message:
change abstract size functions PySequence_Size &c.
add macros for backwards compatibility with C source


Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.40
retrieving revision 2.41
diff -C2 -r2.40 -r2.41
*** abstract.c	2000/07/09 04:34:13	2.40
--- abstract.c	2000/07/12 12:56:19	2.41
***************
*** 63,67 ****
  
  int
! PyObject_Length(PyObject *o)
  {
  	PySequenceMethods *m;
--- 63,67 ----
  
  int
! PyObject_Size(PyObject *o)
  {
  	PySequenceMethods *m;
***************
*** 76,80 ****
  		return m->sq_length(o);
  
! 	return PyMapping_Length(o);
  }
  
--- 76,80 ----
  		return m->sq_length(o);
  
! 	return PyMapping_Size(o);
  }
  
***************
*** 804,808 ****
  
  int
! PySequence_Length(PyObject *s)
  {
  	PySequenceMethods *m;
--- 804,808 ----
  
  int
! PySequence_Size(PyObject *s)
  {
  	PySequenceMethods *m;
***************
*** 1037,1041 ****
  		int i;
  		PyObject *t;
! 		int n = PySequence_Length(v);
  		if (n < 0)
  			return NULL;
--- 1037,1041 ----
  		int i;
  		PyObject *t;
! 		int n = PySequence_Size(v);
  		if (n < 0)
  			return NULL;
***************
*** 1088,1092 ****
  		int i;
  		PyObject *l;
! 		int n = PySequence_Length(v);
  		if (n < 0)
  			return NULL;
--- 1088,1092 ----
  		int i;
  		PyObject *l;
! 		int n = PySequence_Size(v);
  		if (n < 0)
  			return NULL;
***************
*** 1153,1157 ****
  	}
  	
! 	l = PySequence_Length(s);
  	if (l < 0)
  		return -1;
--- 1153,1157 ----
  	}
  	
! 	l = PySequence_Size(s);
  	if (l < 0)
  		return -1;
***************
*** 1233,1237 ****
  	}
  	
! 	l = PySequence_Length(s);
  	if (l < 0)
  		return -1;
--- 1233,1237 ----
  	}
  	
! 	l = PySequence_Size(s);
  	if (l < 0)
  		return -1;
***************
*** 1262,1266 ****
  
  int
! PyMapping_Length(PyObject *o)
  {
  	PyMappingMethods *m;
--- 1262,1266 ----
  
  int
! PyMapping_Size(PyObject *o)
  {
  	PyMappingMethods *m;

Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.86
retrieving revision 2.87
diff -C2 -r2.86 -r2.87
*** object.c	2000/07/11 21:47:20	2.86
--- object.c	2000/07/12 12:56:19	2.87
***************
*** 959,963 ****
  
  /* Hack to force loading of abstract.o */
! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length;
  
  
--- 959,963 ----
  
  /* Hack to force loading of abstract.o */
! int (*_Py_abstract_hack)(PyObject *) = &PyObject_Size;