From 4cbffcd4f146ccceafccd9fa9d522640d1f0f519 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 10 Dec 2024 08:33:54 +0100 Subject: [PATCH] libfdt.i_shipped: use SWIG_AppendOutput Fix this build error with modern SWIG: scripts/dtc/pylibfdt/libfdt_wrap.c: In function '_wrap_fdt_next_node': scripts/dtc/pylibfdt/libfdt_wrap.c:5578:17: error: too few arguments to function 'SWIG_Python_AppendOutput' 5578 | resultobj = SWIG_Python_AppendOutput(resultobj, val); Patch is based on: https://github.com/dgibson/dtc/pull/154 --- scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped index 27c29ea260..3bbbfb3c9f 100644 --- a/scripts/dtc/pylibfdt/libfdt.i_shipped +++ b/scripts/dtc/pylibfdt/libfdt.i_shipped @@ -1033,7 +1033,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); } } @@ -1072,7 +1072,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 }; @@ -1088,7 +1088,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.1