[Python-checkins] cpython: Fix compilation warnings under 64-bit Windows
antoine.pitrou
python-checkins at python.org
Thu Oct 6 15:47:52 CEST 2011
http://hg.python.org/cpython/rev/d760b345d7bd
changeset: 72751:d760b345d7bd
user: Antoine Pitrou <solipsis at pitrou.net>
date: Thu Oct 06 15:44:15 2011 +0200
summary:
Fix compilation warnings under 64-bit Windows
files:
Modules/unicodedata.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -616,13 +616,13 @@
static int
find_nfc_index(PyObject *self, struct reindex* nfc, Py_UCS4 code)
{
- int index;
+ unsigned int index;
for (index = 0; nfc[index].start; index++) {
- int start = nfc[index].start;
+ unsigned int start = nfc[index].start;
if (code < start)
return -1;
if (code <= start + nfc[index].count) {
- int delta = code - start;
+ unsigned int delta = code - start;
return nfc[index].index + delta;
}
}
@@ -1038,7 +1038,7 @@
*len = -1;
for (i = 0; i < count; i++) {
char *s = hangul_syllables[i][column];
- len1 = strlen(s);
+ len1 = Py_SAFE_DOWNCAST(strlen(s), size_t, int);
if (len1 <= *len)
continue;
if (strncmp(str, s, len1) == 0) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list