Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] python-sip: fix compile error
@ 2023-11-23 17:41 Ralf Dragon
  2023-11-25 22:04 ` Yann E. MORIN
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Dragon @ 2023-11-23 17:41 UTC (permalink / raw)
  To: buildroot; +Cc: Ralf Dragon, Gwenhael Goavec-Merou, Asaf Kahlon

Without the patch, python-sip fails with:

siplib.c: In function ‘sip_api_get_frame’:
siplib.c:13750:22: error: invalid use of undefined type ‘struct _frame’
13750 |         frame = frame->f_back;

Signed-off-by: Ralf Dragon <hypnotoad@lindra.de>
---
 package/python-sip/0002-fixframe.patch | 46 ++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/python-sip/0002-fixframe.patch

diff --git a/package/python-sip/0002-fixframe.patch b/package/python-sip/0002-fixframe.patch
new file mode 100644
index 0000000000..86eb878b11
--- /dev/null
+++ b/package/python-sip/0002-fixframe.patch
@@ -0,0 +1,46 @@
+Signed-off-by: Ralf Dragon <hypnotoad@lindra.de>
+
+Index: host-python-sip-4.19.25/siplib/sip.h
+===================================================================
+--- host-python-sip-4.19.25.orig/siplib/sip.h
++++ host-python-sip-4.19.25/siplib/sip.h
+@@ -1799,7 +1799,7 @@ typedef struct _sipAPIDef {
+     int (*api_get_time)(PyObject *, sipTimeDef *);
+     PyObject *(*api_from_time)(const sipTimeDef *);
+     int (*api_is_user_type)(const sipWrapperType *);
+-    struct _frame *(*api_get_frame)(int);
++    PyFrameObject *(*api_get_frame)(int);
+     int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
+     PyObject *(*api_unicode_new)(SIP_SSIZE_T, unsigned, int *, void **);
+     void (*api_unicode_write)(int, void *, int, unsigned);
+Index: host-python-sip-4.19.25/siplib/siplib.c
+===================================================================
+--- host-python-sip-4.19.25.orig/siplib/siplib.c
++++ host-python-sip-4.19.25/siplib/siplib.c
+@@ -448,7 +448,7 @@ static PyObject *sip_api_from_datetime(c
+ static int sip_api_get_time(PyObject *obj, sipTimeDef *time);
+ static PyObject *sip_api_from_time(const sipTimeDef *time);
+ static int sip_api_is_user_type(const sipWrapperType *wt);
+-static struct _frame *sip_api_get_frame(int);
++static PyFrameObject *sip_api_get_frame(int);
+ 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
+ /*
+  * Return a frame from the execution stack.
+  */
+-static struct _frame *sip_api_get_frame(int depth)
++static PyFrameObject *sip_api_get_frame(int depth)
+ {
+-    struct _frame *frame = PyEval_GetFrame();
++    PyFrameObject *frame = PyEval_GetFrame();
+ 
+     while (frame != NULL && depth > 0)
+     {
+-        frame = frame->f_back;
++        frame = PyFrame_GetBack(frame);
+         --depth;
+     }
+ 
+
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-12 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23 17:41 [Buildroot] [PATCH 1/1] python-sip: fix compile error Ralf Dragon
2023-11-25 22:04 ` Yann E. MORIN
2023-11-27 21:14   ` Ralf Dragon
2023-11-29  6:42     ` Yann E. MORIN
2023-11-29 22:10       ` Ralf Dragon
2023-12-12 15:20         ` Ralf Dragon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox