diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-06 15:44:15 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-06 15:44:15 +0200 |
commit | 8a2c922aead679890db76bb3f3d8508599274db0 (patch) | |
tree | f7abd457baa5000443b75d42c20de473e94c50be /Modules/unicodedata.c | |
parent | 80062f5b1a4fd0065a32eed5b9fb5dd19faba66a (diff) | |
download | cpython-8a2c922aead679890db76bb3f3d8508599274db0.tar.gz |
Fix compilation warnings under 64-bit Windows
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 03ec65a29d..db0f1153f4 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -616,13 +616,13 @@ nfd_nfkd(PyObject *self, PyObject *input, int k) 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 @@ find_syllable(const char *str, int *len, int *pos, int count, int column) *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) { |