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

Jeremy Hylton python-dev@python.org
2000年7月12日 05:56:21 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv413/Include
Modified Files:
	abstract.h 
Log Message:
change abstract size functions PySequence_Size &c.
add macros for backwards compatibility with C source
Index: abstract.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v
retrieving revision 2.21
retrieving revision 2.22
diff -C2 -r2.21 -r2.22
*** abstract.h	2000年07月09日 00:20:36	2.21
--- abstract.h	2000年07月12日 12:56:18	2.22
***************
*** 382,390 ****
 */
 
! DL_IMPORT(int) PyObject_Length(PyObject *o);
 
 /*
! Return the length of object o. If the object, o, provides
! 	 both sequence and mapping protocols, the sequence length is
 	 returned. On error, -1 is returned. This is the equivalent
 	 to the Python expression: len(o).
--- 382,392 ----
 */
 
! DL_IMPORT(int) PyObject_Size(PyObject *o);
 
+ #define PyObject_Length(O) PyObject_Size((O))
+ 
 /*
! Return the size of object o. If the object, o, provides
! 	 both sequence and mapping protocols, the sequence size is
 	 returned. On error, -1 is returned. This is the equivalent
 	 to the Python expression: len(o).
***************
*** 681,689 ****
 
 */
 
! DL_IMPORT(int) PySequence_Length(PyObject *o);
 
 /*
! Return the length of sequence object o, or -1 on failure.
 
 */
--- 683,693 ----
 
 */
+ 
+ DL_IMPORT(int) PySequence_Size(PyObject *o);
 
! #define PySequence_Length(O) PySequence_Size((O))
 
 /*
! Return the size of sequence object o, or -1 on failure.
 
 */
***************
*** 833,838 ****
 	 This function always succeeds.
 */
 
! DL_IMPORT(int) PyMapping_Length(PyObject *o);
 
 /*
--- 837,844 ----
 	 This function always succeeds.
 */
+ 
+ DL_IMPORT(int) PyMapping_Size(PyObject *o);
 
! #define PyMapping_Length(O) PyMapping_Size((O))
 
 /*

AltStyle によって変換されたページ (->オリジナル) /