diff --git a/srcpkgs/sip4/patches/python-3.11.patch b/srcpkgs/sip4/patches/python-3.11.patch index cf382529950..6d60a5b239c 100644 --- a/srcpkgs/sip4/patches/python-3.11.patch +++ b/srcpkgs/sip4/patches/python-3.11.patch @@ -20,7 +20,7 @@ static int sip_api_check_plugin_for_type(const sipTypeDef *td, const char *name); static PyObject *sip_api_unicode_new(SIP_SSIZE_T len, unsigned maxchar, -@@ -13741,13 +13741,13 @@ static int sip_api_is_user_type(const si +@@ -13741,13 +13741,16 @@ static int sip_api_is_user_type(const si /* * Return a frame from the execution stack. */ @@ -29,11 +29,14 @@ { - struct _frame *frame = PyEval_GetFrame(); + PyFrameObject *frame = PyEval_GetFrame(); ++ Py_XINCREF(frame); while (frame != NULL && depth > 0) { - frame = frame->f_back; ++ PyFrameObject *oframe = frame; + frame = PyFrame_GetBack(frame); ++ Py_DECREF(oframe); --depth; }