From 5e77787cf313225a950f7400b21c7db9f673a3c8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 26 Jan 2024 11:47:26 +0900 Subject: Fix SEGV on exit when using python 3.12 and raise minimum required version to 3.4. Signed-off-by: Michele Calgaro (cherry picked from commit bce54982a6bf61d292f293127118a5010260b63e) --- siplib/siplib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'siplib/siplib.c') diff --git a/siplib/siplib.c b/siplib/siplib.c index c58a47a..b891f79 100644 --- a/siplib/siplib.c +++ b/siplib/siplib.c @@ -1610,7 +1610,7 @@ void *sip_api_malloc(size_t nbytes) { void *mem; - if ((mem = PyMem_Malloc(nbytes)) == NULL) + if ((mem = PyMem_RawMalloc(nbytes)) == NULL) PyErr_NoMemory(); return mem; @@ -1622,7 +1622,7 @@ void *sip_api_malloc(size_t nbytes) */ void sip_api_free(void *mem) { - PyMem_Free(mem); + PyMem_RawFree(mem); } -- cgit v1.2.3