[Python-checkins] CVS: python/dist/src/Include abstract.h,2.24,2.25
M.-A. Lemburg
python-dev@python.org
2000年7月17日 02:22:28 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv8086/Include
Modified Files:
abstract.h
Log Message:
Restore PyXXX_Length() APIs for binary compatibility.
New code will see the macros and therefore use the PyXXX_Size()
APIs instead.
By Thomas Wouters.
Index: abstract.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v
retrieving revision 2.24
retrieving revision 2.25
diff -C2 -r2.24 -r2.25
*** abstract.h 2000年07月16日 12:04:30 2.24
--- abstract.h 2000年07月17日 09:22:26 2.25
***************
*** 384,389 ****
DL_IMPORT(int) PyObject_Size(PyObject *o);
- #define PyObject_Length PyObject_Size
-
/*
Return the size of object o. If the object, o, provides
--- 384,387 ----
***************
*** 394,397 ****
--- 392,401 ----
*/
+ /* For DLL compatibility */
+ #undef PyObject_Length
+ DL_IMPORT(int) PyObject_Length(PyObject *o);
+ #define PyObject_Length PyObject_Size
+
+
DL_IMPORT(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key);
***************
*** 686,691 ****
DL_IMPORT(int) PySequence_Size(PyObject *o);
- #define PySequence_Length PySequence_Size
-
/*
Return the size of sequence object o, or -1 on failure.
--- 690,693 ----
***************
*** 693,696 ****
--- 695,704 ----
*/
+ /* For DLL compatibility */
+ #undef PySequence_Length
+ DL_IMPORT(int) PySequence_Length(PyObject *o);
+ #define PySequence_Length PySequence_Size
+
+
DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2);
***************
*** 840,845 ****
DL_IMPORT(int) PyMapping_Size(PyObject *o);
- #define PyMapping_Length PyMapping_Size
-
/*
Returns the number of keys in object o on success, and -1 on
--- 848,851 ----
***************
*** 847,850 ****
--- 853,862 ----
this is equivalent to the Python expression: len(o).
*/
+
+ /* For DLL compatibility */
+ #undef PyMapping_Length
+ DL_IMPORT(int) PyMapping_Length(PyObject *o);
+ #define PyMapping_Length PyMapping_Size
+
/* implemented as a macro: