mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
sip4: fix memleaks with Python 3.11
This commit is contained in:
parent
18a364694f
commit
f6a6bb7415
1 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
||||||
--- a/siplib/sip.h
|
Index: sip-4.19.25/siplib/sip.h
|
||||||
+++ b/siplib/sip.h
|
===================================================================
|
||||||
|
--- sip-4.19.25.orig/siplib/sip.h
|
||||||
|
+++ sip-4.19.25/siplib/sip.h
|
||||||
@@ -1799,7 +1799,7 @@ typedef struct _sipAPIDef {
|
@@ -1799,7 +1799,7 @@ typedef struct _sipAPIDef {
|
||||||
int (*api_get_time)(PyObject *, sipTimeDef *);
|
int (*api_get_time)(PyObject *, sipTimeDef *);
|
||||||
PyObject *(*api_from_time)(const sipTimeDef *);
|
PyObject *(*api_from_time)(const sipTimeDef *);
|
||||||
|
@ -9,8 +11,10 @@
|
||||||
int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
|
int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
|
||||||
PyObject *(*api_unicode_new)(SIP_SSIZE_T, unsigned, int *, void **);
|
PyObject *(*api_unicode_new)(SIP_SSIZE_T, unsigned, int *, void **);
|
||||||
void (*api_unicode_write)(int, void *, int, unsigned);
|
void (*api_unicode_write)(int, void *, int, unsigned);
|
||||||
--- a/siplib/siplib.c
|
Index: sip-4.19.25/siplib/siplib.c
|
||||||
+++ b/siplib/siplib.c
|
===================================================================
|
||||||
|
--- sip-4.19.25.orig/siplib/siplib.c
|
||||||
|
+++ sip-4.19.25/siplib/siplib.c
|
||||||
@@ -448,7 +448,7 @@ static PyObject *sip_api_from_datetime(c
|
@@ -448,7 +448,7 @@ static PyObject *sip_api_from_datetime(c
|
||||||
static int sip_api_get_time(PyObject *obj, sipTimeDef *time);
|
static int sip_api_get_time(PyObject *obj, sipTimeDef *time);
|
||||||
static PyObject *sip_api_from_time(const sipTimeDef *time);
|
static PyObject *sip_api_from_time(const sipTimeDef *time);
|
||||||
|
@ -20,7 +24,7 @@
|
||||||
static int sip_api_check_plugin_for_type(const sipTypeDef *td,
|
static int sip_api_check_plugin_for_type(const sipTypeDef *td,
|
||||||
const char *name);
|
const char *name);
|
||||||
static PyObject *sip_api_unicode_new(SIP_SSIZE_T len, unsigned maxchar,
|
static PyObject *sip_api_unicode_new(SIP_SSIZE_T len, unsigned maxchar,
|
||||||
@@ -13741,13 +13741,16 @@ static int sip_api_is_user_type(const si
|
@@ -13741,15 +13741,19 @@ static int sip_api_is_user_type(const si
|
||||||
/*
|
/*
|
||||||
* Return a frame from the execution stack.
|
* Return a frame from the execution stack.
|
||||||
*/
|
*/
|
||||||
|
@ -39,4 +43,7 @@
|
||||||
+ Py_DECREF(oframe);
|
+ Py_DECREF(oframe);
|
||||||
--depth;
|
--depth;
|
||||||
}
|
}
|
||||||
|
+ Py_XDECREF(frame);
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue