Fix SEGV on exit when using python 3.12 and raise minimum required version to 3.4.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/17/head
Michele Calgaro 4 months ago
parent c35201f922
commit bce54982a6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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)) 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: if py_version < 0x030400:
siputils.error("This version of SIP-TQt requires Python v3.3 or later.") siputils.error("This version of SIP-TQt requires Python v3.4 or later.")
global extra_lib_dir global extra_lib_dir

@ -46,8 +46,8 @@ extern "C" {
/* Sanity check on the Python version. */ /* Sanity check on the Python version. */
#if PY_VERSION_HEX < 0x03030000 #if PY_VERSION_HEX < 0x03040000
#error "This version of SIP-TQt requires Python v3.3 or later" #error "This version of SIP-TQt requires Python v3.4 or later"
#endif #endif

@ -1610,7 +1610,7 @@ void *sip_api_malloc(size_t nbytes)
{ {
void *mem; void *mem;
if ((mem = PyMem_Malloc(nbytes)) == NULL) if ((mem = PyMem_RawMalloc(nbytes)) == NULL)
PyErr_NoMemory(); PyErr_NoMemory();
return mem; return mem;
@ -1622,7 +1622,7 @@ void *sip_api_malloc(size_t nbytes)
*/ */
void sip_api_free(void *mem) void sip_api_free(void *mem)
{ {
PyMem_Free(mem); PyMem_RawFree(mem);
} }

Loading…
Cancel
Save