[Python-checkins] r68642 - sandbox/trunk/io-c/_textio.c

antoine.pitrou python-checkins at python.org
Sat Jan 17 02:01:07 CET 2009


Author: antoine.pitrou
Date: Sat Jan 17 02:01:07 2009
New Revision: 68642

Log:
fix gcc warnings about signedness mismatch



Modified:
   sandbox/trunk/io-c/_textio.c

Modified: sandbox/trunk/io-c/_textio.c
==============================================================================
--- sandbox/trunk/io-c/_textio.c	(original)
+++ sandbox/trunk/io-c/_textio.c	Sat Jan 17 02:01:07 2009
@@ -1541,7 +1541,7 @@
 static int
 TextIOWrapper_parseCookie(CookieStruct *cookie, PyObject *cookieObj)
 {
-    char buffer[COOKIE_BUF_LEN];
+    unsigned char buffer[COOKIE_BUF_LEN];
     PyLongObject *cookieLong = (PyLongObject *)PyNumber_Long(cookieObj);
     if (cookieLong == NULL)
         return -1;
@@ -1565,7 +1565,7 @@
 static PyObject *
 TextIOWrapper_buildCookie(CookieStruct *cookie)
 {
-    char buffer[COOKIE_BUF_LEN];
+    unsigned char buffer[COOKIE_BUF_LEN];
 
     * (Py_off_t *)(buffer + OFF_START_POS)     = cookie->start_pos;
     * (int *)     (buffer + OFF_DEC_FLAGS)     = cookie->dec_flags;


More information about the Python-checkins mailing list