From: Guido van Rossum Date: Thu, 20 Sep 2001 19:18:30 +0000 (+0000) Subject: PyLocale_setlocale(): silence compiler warning about free() of a const X-Git-Tag: v2.2.1c1~1706 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=461591eb174ed0122e156606470bc6003855f7a3;p=thirdparty%2FPython%2Fcpython.git PyLocale_setlocale(): silence compiler warning about free() of a const char *. --- diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index a3a1d1297197..61a5c7c883f1 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -215,7 +215,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args) if (*codeset && (enc = PyCodec_Encoder(codeset))) { /* Release previous file encoding */ if (Py_FileSystemDefaultEncoding) - free (Py_FileSystemDefaultEncoding); + free((char *)Py_FileSystemDefaultEncoding); Py_FileSystemDefaultEncoding = strdup(codeset); Py_DECREF(enc); } else