diff Objects/unicodeobject.c @ 22270:69ad2a1ad689 2.2

Move to zlib 1.1.4 on Windows (the new version that squashes the "double free" glitch). unicodeobject.c: squash compiler warnings. Noting that test_pyclbr currently fails in 2.2.1: test_others (__main__.PyclbrTest) ... ??? HTTP11 FAIL
author Tim Peters <tim.peters@gmail.com>
date Wed, 13 Mar 2002 23:56:48 +0000
parents f3863303a9f4
children 0a96dab70a15
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Wed Mar 13 03:56:54 2002 +0000
+++ b/Objects/unicodeobject.c	Wed Mar 13 23:56:48 2002 +0000
@@ -1200,7 +1200,7 @@
                     ch2 = s[i];
                     if (0xDC00 <= ch2 && ch2 <= 0xDFFF) {
                         
-                        if ((p - q) >= (cbAllocated - 4)) {
+                        if ((Py_uintptr_t)(p - q) >= (cbAllocated - 4)) {
                             /* Provide enough room for some more
                                surrogates */
                             cbAllocated += 4*10;
@@ -1225,7 +1225,7 @@
             *p++ = (char)(0x80 | (ch & 0x3f));
 
         } else {
-            if ((p - q) >= (cbAllocated - 4)) {
+            if ((Py_uintptr_t)(p - q) >= (cbAllocated - 4)) {
                 /* Provide enough room for some more
                    surrogates */
                 cbAllocated += 4*10;