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

nikhil n nikhil.n.n at gmail.com
Mon May 14 15:38:48 EDT 2007


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

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

-=-
Modified: ZODB/branches/nikhil_n-py25/src/BTrees/_fsBTree.c
===================================================================
--- ZODB/branches/nikhil_n-py25/src/BTrees/_fsBTree.c	2007-05-14 19:38:15 UTC (rev 75752)
+++ ZODB/branches/nikhil_n-py25/src/BTrees/_fsBTree.c	2007-05-14 19:38:45 UTC (rev 75753)
@@ -45,7 +45,7 @@
 #define DECREF_KEY(KEY)
 #define INCREF_KEY(k)
 #define COPY_KEY(KEY, E) (*(KEY)=*(E), (KEY)[1]=(E)[1])
-#define COPY_KEY_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,2)
+#define COPY_KEY_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,(Py_ssize_t)2)
 #define COPY_KEY_FROM_ARG(TARGET, ARG, STATUS) \
   if (KEY_CHECK(ARG)) memcpy(TARGET, PyString_AS_STRING(ARG), 2); else { \
       PyErr_SetString(PyExc_TypeError, "expected two-character string key"); \
@@ -59,7 +59,7 @@
 #define DECREF_VALUE(k)
 #define INCREF_VALUE(k)
 #define COPY_VALUE(V, E) (memcpy(V, E, 6))
-#define COPY_VALUE_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,6)
+#define COPY_VALUE_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,(Py_ssize_t)6)
 #define COPY_VALUE_FROM_ARG(TARGET, ARG, STATUS) \
   if ((PyString_Check(ARG) && PyString_GET_SIZE(ARG)==6)) \
       memcpy(TARGET, PyString_AS_STRING(ARG), 6); else { \



More information about the Zodb-checkins mailing list