]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111178: Fix locale_free() signature (#124896)
authorVictor Stinner <vstinner@python.org>
Wed, 2 Oct 2024 13:58:47 +0000 (15:58 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Oct 2024 13:58:47 +0000 (13:58 +0000)
Modules/_localemodule.c

index de7395b610e133fa0ed5394f3fb98a74ce2af2bc..9452df492bb23b8fbc5f3290cdc4a5cd42649e04 100644 (file)
@@ -881,9 +881,9 @@ locale_clear(PyObject *module)
 }
 
 static void
-locale_free(PyObject *module)
+locale_free(void *module)
 {
-    locale_clear(module);
+    locale_clear((PyObject*)module);
 }
 
 static struct PyModuleDef _localemodule = {
@@ -895,7 +895,7 @@ static struct PyModuleDef _localemodule = {
     _locale_slots,
     locale_traverse,
     locale_clear,
-    (freefunc)locale_free,
+    locale_free,
 };
 
 PyMODINIT_FUNC