From 461591eb174ed0122e156606470bc6003855f7a3 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 20 Sep 2001 19:18:30 +0000 Subject: [PATCH] PyLocale_setlocale(): silence compiler warning about free() of a const char *. --- Modules/_localemodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index a3a1d12971..61a5c7c883 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 -- 2.40.0