summaryrefslogtreecommitdiff
path: root/Include/bytes_methods.h
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-27 04:40:50 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-27 04:40:50 +0000
commit23afb7580f5fbfc450ad24ae71058f18d782f5c0 (patch)
tree8716a050d1600d7030e6a0c15045bacaffef79e1 /Include/bytes_methods.h
parent257fac8df7a8388f01ec64f40f1fb2b73d9a4668 (diff)
downloadcpython-23afb7580f5fbfc450ad24ae71058f18d782f5c0.tar.gz
Fix warnings about using char as an array subscript. This is not portable
since char is signed on some platforms and unsigned on others.
Diffstat (limited to 'Include/bytes_methods.h')
-rw-r--r--Include/bytes_methods.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Include/bytes_methods.h b/Include/bytes_methods.h
index 59873f29a0..a05e11f433 100644
--- a/Include/bytes_methods.h
+++ b/Include/bytes_methods.h
@@ -44,13 +44,13 @@ extern const char _Py_swapcase__doc__[];
extern const unsigned int _Py_ctype_table[256];
-#define ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_LOWER)
-#define ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_UPPER)
-#define ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALPHA)
-#define ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_DIGIT)
-#define ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_XDIGIT)
-#define ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALNUM)
-#define ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_SPACE)
+#define ISLOWER(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_LOWER)
+#define ISUPPER(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_UPPER)
+#define ISALPHA(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_ALPHA)
+#define ISDIGIT(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_DIGIT)
+#define ISXDIGIT(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_XDIGIT)
+#define ISALNUM(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_ALNUM)
+#define ISSPACE(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_SPACE)
#undef islower
#define islower(c) undefined_islower(c)