Skip to content

Commit

Permalink
scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-by: Rudi Heitbaum <[email protected]>
Link: dgibson/dtc#154
  • Loading branch information
MarkusVolk authored and ggardet committed Nov 8, 2024
1 parent 53ff6a6 commit a6f61fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/dtc/pylibfdt/libfdt.i_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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 };
Expand All @@ -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);
}
}

Expand Down

0 comments on commit a6f61fc

Please sign in to comment.