]> granicus.if.org Git - python/commitdiff
PyLocale_setlocale(): silence compiler warning about free() of a const
authorGuido van Rossum <guido@python.org>
Thu, 20 Sep 2001 19:18:30 +0000 (19:18 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 20 Sep 2001 19:18:30 +0000 (19:18 +0000)
char *.

Modules/_localemodule.c

index a3a1d1297197a802caa4fdb3199058088e126bfc..61a5c7c883f1753142623b3942a474804946abdc 100644 (file)
@@ -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