[Python-checkins] python/dist/src/Include abstract.h,2.43,2.44
loewis@sourceforge.net
loewis@sourceforge.net
Wed, 08 May 2002 01:44:23 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv2607/Include
Modified Files:
abstract.h
Log Message:
Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
Index: abstract.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v
retrieving revision 2.43
retrieving revision 2.44
diff -C2 -d -r2.43 -r2.44
*** abstract.h 5 Jan 2002 10:50:30 -0000 2.43
--- abstract.h 8 May 2002 08:44:21 -0000 2.44
***************
*** 1016,1019 ****
--- 1016,1025 ----
*/
+ #define PySequence_ITEM(o, i)\
+ ( o->ob_type->tp_as_sequence->sq_item(o, i) )
+ /* Assume tp_as_sequence and sq_item exist and that i does not
+ need to be corrected for a negative index
+ */
+
DL_IMPORT(int) PySequence_Count(PyObject *o, PyObject *value);