Openembedded Core Discussions
 help / color / mirror / Atom feed
* [oe-core][PATCH] python3-dtc: fix language specific AppendOutput functions with swig 4.3.0
@ 2024-10-28 17:36 Markus Volk
  2024-10-29 12:47 ` Mathieu Dubois-Briand
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Volk @ 2024-10-28 17:36 UTC (permalink / raw)
  To: openembedded-core

Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 .../0001-libfdt.i-Use-SWIG_AppendOutput.patch | 51 +++++++++++++++++++
 .../python/python3-dtc_1.7.0.bb               |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch

diff --git a/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
new file mode 100644
index 0000000000..c9c3a886f1
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
@@ -0,0 +1,51 @@
+From 4eb1df0be56103b8058c126dd437bfb6dbaa5bb2 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Mon, 28 Oct 2024 18:05:53 +0100
+Subject: [PATCH] libfdt.i: Use SWIG_AppendOutput
+
+Swig has changed language specific AppendOutput functions. The helper
+macro SWIG_AppendOutput remains unchanged. Use that instead
+of SWIG_Python_AppendOutput, which would require an extra parameter
+since swig 4.3.0.
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Upstream-Status: Submitted [https://github.com/dgibson/dtc/pull/154]
+---
+ pylibfdt/libfdt.i | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
+index 2361e22..e04053e 100644
+--- a/pylibfdt/libfdt.i
++++ b/pylibfdt/libfdt.i
+@@ -1080,7 +1080,7 @@ typedef uint32_t fdt32_t;
+ 			fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
+ 		buff = PyByteArray_FromStringAndSize(
+ 			(const char *)($1 + 1), fdt32_to_cpu($1->len));
+-		resultobj = SWIG_Python_AppendOutput(resultobj, buff);
++		resultobj = SWIG_AppendOutput(resultobj, buff);
+ 	}
+ }
+ 
+@@ -1121,7 +1121,7 @@ typedef uint32_t fdt32_t;
+ 
+ %typemap(argout) int *depth {
+         PyObject *val = Py_BuildValue("i", *arg$argnum);
+-        resultobj = SWIG_Python_AppendOutput(resultobj, val);
++        resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+ 
+ %apply int *depth { int *depth };
+@@ -1137,7 +1137,7 @@ typedef uint32_t fdt32_t;
+            if (PyTuple_GET_SIZE(resultobj) == 0)
+               resultobj = val;
+            else
+-              resultobj = SWIG_Python_AppendOutput(resultobj, val);
++              resultobj = SWIG_AppendOutput(resultobj, val);
+         }
+ }
+ 
+-- 
+2.47.0
+
diff --git a/meta/recipes-devtools/python/python3-dtc_1.7.0.bb b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
index 85e48d4694..a32db56cac 100644
--- a/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
+++ b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
@@ -8,6 +8,7 @@ DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native li
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
            file://0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch \
+           file://0001-libfdt.i-Use-SWIG_AppendOutput.patch \
           "
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
-- 
2.47.0



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

end of thread, other threads:[~2024-10-30  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 17:36 [oe-core][PATCH] python3-dtc: fix language specific AppendOutput functions with swig 4.3.0 Markus Volk
2024-10-29 12:47 ` Mathieu Dubois-Briand
2024-10-30  5:23   ` Markus Volk

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