diff mbox series

scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput

Message ID 20241030050716.854676-1-f_l_k@t-online.de
State Accepted
Delegated to: Tom Rini
Headers show
Series scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput | expand

Commit Message

Markus Volk Oct. 30, 2024, 5:07 a.m. UTC
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.

/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
|  5581 |     resultobj = SWIG_Python_AppendOutput(resultobj, val);
|       |                 ^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tom Rini Oct. 30, 2024, 7:01 p.m. UTC | #1
On Wed, Oct 30, 2024 at 06:07:16AM +0100, Markus Volk wrote:

> 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.
> 
> /home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
> | scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
> | scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
> |  5581 |     resultobj = SWIG_Python_AppendOutput(resultobj, val);
> |       |                 ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>

Ah, I see this has been merged upstream now as well. Rudi posted the
same patch to U-Boot a bit sooner, but since you have the change merged
upstream I'll apply yours shortly and give Rudi a Reported-by tag on the
commit as well, to try and be fair. Thanks!

So that patchwork/b4/etc pick it up:
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://github.com/dgibson/dtc/pull/154
Tom Rini Oct. 30, 2024, 10:59 p.m. UTC | #2
On Wed, 30 Oct 2024 06:07:16 +0100, Markus Volk wrote:

> 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.
> 
> /home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
> | scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
> | scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
> |  5581 |     resultobj = SWIG_Python_AppendOutput(resultobj, val);
> |       |                 ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index 56cc5d48f4..e4659489a9 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -1037,7 +1037,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);
 	}
 }
 
@@ -1076,7 +1076,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 };
@@ -1092,7 +1092,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);
         }
 }