[Zodb-checkins] SVN: ZODB/branches/nikhil_n-py25/src/BTrees/SetOpTemplate.c make C API work with Python 2.5

nikhil n nikhil.n.n at gmail.com
Mon May 14 15:36:28 EDT 2007


Log message for revision 75749:
  make C API work with Python 2.5

Changed:
  U   ZODB/branches/nikhil_n-py25/src/BTrees/SetOpTemplate.c

-=-
Modified: ZODB/branches/nikhil_n-py25/src/BTrees/SetOpTemplate.c
===================================================================
--- ZODB/branches/nikhil_n-py25/src/BTrees/SetOpTemplate.c	2007-05-14 19:36:03 UTC (rev 75748)
+++ ZODB/branches/nikhil_n-py25/src/BTrees/SetOpTemplate.c	2007-05-14 19:36:28 UTC (rev 75749)
@@ -489,7 +489,7 @@
     UNLESS(PyArg_ParseTuple(args, "O", &seq))
         return NULL;
 
-    n = PyObject_Length(seq);
+    n = (int)PyObject_Length(seq);
     if (n < 0)
         return NULL;
 
@@ -501,7 +501,7 @@
     /* For each set in the input sequence, append its elements to the result
        set.  At this point, we ignore the possibility of duplicates. */
     for (i = 0; i < n; ++i) {
-        set = PySequence_GetItem(seq, i);
+        set = PySequence_GetItem(seq, (Py_ssize_t)i);
         if (set == NULL)
             goto Error;
 



More information about the Zodb-checkins mailing list