From cfbde65df318eea243706ff876e5ef834c085e5f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 15 Jan 2022 10:52:19 +0200 Subject: bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) --- .../next/Core and Builtins/2022-01-14-20-55-34.bpo-46383.v8MTl4.rst | 2 ++ Modules/_zoneinfo.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2022-01-14-20-55-34.bpo-46383.v8MTl4.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-01-14-20-55-34.bpo-46383.v8MTl4.rst b/Misc/NEWS.d/next/Core and Builtins/2022-01-14-20-55-34.bpo-46383.v8MTl4.rst new file mode 100644 index 0000000..8f8b127 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-01-14-20-55-34.bpo-46383.v8MTl4.rst @@ -0,0 +1,2 @@ +Fix invalid signature of ``_zoneinfo``'s ``module_free`` function to resolve +a crash on wasm32-emscripten platform. diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index cac3470..1535721 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2612,7 +2612,7 @@ static PyTypeObject PyZoneInfo_ZoneInfoType = { // Specify the _zoneinfo module static PyMethodDef module_methods[] = {{NULL, NULL}}; static void -module_free(void) +module_free(void *m) { Py_XDECREF(_tzpath_find_tzfile); _tzpath_find_tzfile = NULL; -- cgit v0.12