[Python-checkins] cpython: fix compiler warnings

benjamin.peterson python-checkins at python.org
Tue Oct 4 01:34:17 CEST 2011


http://hg.python.org/cpython/rev/afb60b190f1c
changeset:   72633:afb60b190f1c
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Oct 03 19:34:12 2011 -0400
summary:
  fix compiler warnings

files:
  Objects/unicodeobject.c |  12 +++++++++---
  1 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -369,6 +369,12 @@
     }
     return 1;
 }
+#else
+static int
+_PyUnicode_CheckConsistency(void *op)
+{
+    return 1;
+}
 #endif
 
 /* --- Bloom Filters ----------------------------------------------------- */
@@ -536,7 +542,7 @@
         _PyUnicode_LENGTH(unicode) = length;
         PyUnicode_WRITE(PyUnicode_KIND(unicode), data, length, 0);
         if (share_wstr || _PyUnicode_WSTR(unicode) == NULL) {
-            _PyUnicode_CHECK(unicode);
+            _PyUnicode_CheckConsistency(unicode);
             return 0;
         }
     }
@@ -556,7 +562,7 @@
     _PyUnicode_WSTR(unicode) = wstr;
     _PyUnicode_WSTR(unicode)[length] = 0;
     _PyUnicode_WSTR_LENGTH(unicode) = length;
-    _PyUnicode_CHECK(unicode);
+    _PyUnicode_CheckConsistency(unicode);
     return 0;
 }
 
@@ -1354,7 +1360,7 @@
         *p_unicode = resize_compact(unicode, length);
         if (*p_unicode == NULL)
             return -1;
-        _PyUnicode_CHECK(*p_unicode);
+        _PyUnicode_CheckConsistency(*p_unicode);
         return 0;
     } else
         return resize_inplace((PyUnicodeObject*)unicode, length);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list