summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-01-26 11:47:26 +0900
committerMichele Calgaro <[email protected]>2024-01-26 11:56:45 +0900
commitbce54982a6bf61d292f293127118a5010260b63e (patch)
tree5084e2d40fe84f9df4967248b2c4746e3b446462
parentc35201f9225d22cf17073e36300c6afd92d89700 (diff)
downloadsip4-tqt-bce54982a6bf61d292f293127118a5010260b63e.tar.gz
sip4-tqt-bce54982a6bf61d292f293127118a5010260b63e.zip
Fix SEGV on exit when using python 3.12 and raise minimum required version to 3.4.
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--configure.py4
-rw-r--r--siplib/sip-tqt.h4
-rw-r--r--siplib/siplib.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/configure.py b/configure.py
index 3a1eb0d..d4d8a3f 100644
--- a/configure.py
+++ b/configure.py
@@ -389,8 +389,8 @@ def main(argv):
"""
siputils.inform("This is SIP-TQt %s for Python %s on %s platform." % (sip_version_str, sys.version.split()[0], sys.platform))
- if py_version < 0x030300:
- siputils.error("This version of SIP-TQt requires Python v3.3 or later.")
+ if py_version < 0x030400:
+ siputils.error("This version of SIP-TQt requires Python v3.4 or later.")
global extra_lib_dir
diff --git a/siplib/sip-tqt.h b/siplib/sip-tqt.h
index 02585cd..b2c6e52 100644
--- a/siplib/sip-tqt.h
+++ b/siplib/sip-tqt.h
@@ -46,8 +46,8 @@ extern "C" {
/* Sanity check on the Python version. */
-#if PY_VERSION_HEX < 0x03030000
-#error "This version of SIP-TQt requires Python v3.3 or later"
+#if PY_VERSION_HEX < 0x03040000
+#error "This version of SIP-TQt requires Python v3.4 or later"
#endif
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);
}