Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 461591e

Browse files
committed
PyLocale_setlocale(): silence compiler warning about free() of a const
char *.
1 parent 3508e30 commit 461591e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_localemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
215215
if (*codeset && (enc = PyCodec_Encoder(codeset))) {
216216
/* Release previous file encoding */
217217
if (Py_FileSystemDefaultEncoding)
218-
free (Py_FileSystemDefaultEncoding);
218+
free((char *)Py_FileSystemDefaultEncoding);
219219
Py_FileSystemDefaultEncoding = strdup(codeset);
220220
Py_DECREF(enc);
221221
} else

0 commit comments

Comments
 (0)