summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_tkinter.c2
-rw-r--r--Modules/unicodedata.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index b85e158..ebaf799 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -647,7 +647,7 @@ Tkapp_New(char *screenName, char *baseName, char *className,
strcpy(argv0, className);
if (isupper(Py_CHARMASK(argv0[0])))
- argv0[0] = tolower(argv0[0]);
+ argv0[0] = tolower(Py_CHARMASK(argv0[0]));
Tcl_SetVar(v->interp, "argv0", argv0, TCL_GLOBAL_ONLY);
ckfree(argv0);
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 9eda653..faadf88 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -759,7 +759,7 @@ _gethash(const char *s, int len, int scale)
unsigned long h = 0;
unsigned long ix;
for (i = 0; i < len; i++) {
- h = (h * scale) + (unsigned char) toupper(s[i]);
+ h = (h * scale) + (unsigned char) toupper(Py_CHARMASK(s[i]));
ix = h & 0xff000000;
if (ix)
h = (h ^ ((ix>>24) & 0xff)) & 0x00ffffff;
@@ -906,7 +906,7 @@ _cmpname(PyObject *self, int code, const char* name, int namelen)
if (!_getucname(self, code, buffer, sizeof(buffer)))
return 0;
for (i = 0; i < namelen; i++) {
- if (toupper(name[i]) != buffer[i])
+ if (toupper(Py_CHARMASK(name[i])) != buffer[i])
return 0;
}
return buffer[namelen] == '\0';