summaryrefslogtreecommitdiffstats
path: root/Modules/_localemodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_localemodule.c')
-rw-r--r--Modules/_localemodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index 2d84d80..e3d1e7f 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -382,11 +382,11 @@ PyLocale_getdefaultlocale(PyObject* self)
if (GetLocaleInfo(LOCALE_USER_DEFAULT,
LOCALE_SISO639LANGNAME,
locale, sizeof(locale))) {
- int i = strlen(locale);
+ Py_ssize_t i = strlen(locale);
locale[i++] = '_';
if (GetLocaleInfo(LOCALE_USER_DEFAULT,
LOCALE_SISO3166CTRYNAME,
- locale+i, sizeof(locale)-i))
+ locale+i, (int)(sizeof(locale)-i)))
return Py_BuildValue("ss", locale, encoding);
}