[Zodb-checkins] SVN: ZODB/trunk/ Suppressed warnings about signedness of characters when compiling under GCC 4.0.x.

Tres Seaver tseaver at palladion.com
Sat Feb 11 16:33:49 EST 2006


Log message for revision 41599:
  Suppressed warnings about signedness of characters when compiling under GCC 4.0.x.
  
  See http://www.zope.org/Collectors/Zope/2027.
  

Changed:
  U   ZODB/trunk/NEWS.txt
  U   ZODB/trunk/src/BTrees/_fsBTree.c
  U   ZODB/trunk/src/persistent/TimeStamp.c

-=-
Modified: ZODB/trunk/NEWS.txt
===================================================================
--- ZODB/trunk/NEWS.txt	2006-02-11 21:24:16 UTC (rev 41598)
+++ ZODB/trunk/NEWS.txt	2006-02-11 21:33:49 UTC (rev 41599)
@@ -41,12 +41,24 @@
   tools need to perform minimal logging configuration themselves. Changed
   the zeoup script to do so and thus enable it to emit error messages.
 
+BTrees
+------
+
+- (3.7a1) Suppressed warnings about signedness of characters when
+  compiling under GCC 4.0.x.  See http://www.zope.org/Collectors/Zope/2027.
+
 Connection
 ----------
 
 - (3.7a1) An optimization for loading non-current data (MVCC) was
   inadvertently disabled in ``_setstate()``; this has been repaired.
 
+persistent
+----------
+
+- (3.7a1) Suppressed warnings about signedness of characters when
+  compiling under GCC 4.0.x.  See http://www.zope.org/Collectors/Zope/2027.
+
 After Commit hooks
 ------------------
 

Modified: ZODB/trunk/src/BTrees/_fsBTree.c
===================================================================
--- ZODB/trunk/src/BTrees/_fsBTree.c	2006-02-11 21:24:16 UTC (rev 41598)
+++ ZODB/trunk/src/BTrees/_fsBTree.c	2006-02-11 21:33:49 UTC (rev 41599)
@@ -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(K,2)
+#define COPY_KEY_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,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(K,6)
+#define COPY_VALUE_TO_OBJECT(O, K) O=PyString_FromStringAndSize((const char*)K,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 { \

Modified: ZODB/trunk/src/persistent/TimeStamp.c
===================================================================
--- ZODB/trunk/src/persistent/TimeStamp.c	2006-02-11 21:24:16 UTC (rev 41598)
+++ ZODB/trunk/src/persistent/TimeStamp.c	2006-02-11 21:33:49 UTC (rev 41599)
@@ -218,7 +218,7 @@
 static PyObject *
 TimeStamp_raw(TimeStamp *self)
 {
-    return PyString_FromStringAndSize(self->data, 8);
+    return PyString_FromStringAndSize((const char*)self->data, 8);
 }
 
 static PyObject *
@@ -261,7 +261,7 @@
 	    new[i] = 0;
 	else {
 	    new[i]++;
-	    return TimeStamp_FromString(new);
+	    return TimeStamp_FromString((const char*)new);
 	}
     }
 



More information about the Zodb-checkins mailing list