]> granicus.if.org Git - python/commitdiff
Fix a compiler warning in _locale
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 11 Oct 2011 20:35:52 +0000 (22:35 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 11 Oct 2011 20:35:52 +0000 (22:35 +0200)
Modules/_localemodule.c

index 72450def3d6945bbe6178b1d693a1b4871f5d326..9bba1b39cf7c3355fd6a29b57ac2c6fe664e6aaf 100644 (file)
@@ -292,7 +292,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
         goto exit;
     }
     n2 = wcsxfrm(buf, s, n1);
-    if (n2 >= n1) {
+    if (n2 >= (size_t)n1) {
         /* more space needed */
         buf = PyMem_Realloc(buf, (n2+1)*sizeof(wchar_t));
         if (!buf) {