libfdt: Fix build with swig 4.3.0
PATCH 1/1 libfdt: Fix build with swig 4.3.0
Call SWIG_AppendOutput instead of SWIG_Python_AppendOutput so that is_void is handled within swig.
--- scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/dtc/pylibfdt/libfdt.i_shipped +3 -3
@@ -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); } }
Signature · 1 line
2.43.0
Quoted 6 lines · Rudi Heitbaum
Call
SWIG_AppendOutputinstead ofSWIG_Python_AppendOutputso thatis_voidis handled within swig.Signed-off-by Rudi Heitbaum <[email protected]>
Dtc is a separate project at
https://git.kernel.org/pub/scm/utils/dtc/dtc.git, so the patch should be rebased against it and sent to [email protected].
Quoted 35 lines
---
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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));scripts/dtc/pylibfdt/libfdt.i_shipped +1
-1- resultobj = SWIG_Python_AppendOutput(resultobj, buff); + resultobj = SWIG_AppendOutput(resultobj, buff);}
}scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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 };scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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); }
}
Signature · 2 lines
Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University
Quoted 11 lines · Xi Ruoyao
Quoted 6 lines · Rudi Heitbaum
Call
SWIG_AppendOutputinstead ofSWIG_Python_AppendOutputso thatis_voidis handled within swig.Signed-off-by Rudi Heitbaum <[email protected]>Dtc is a separate project at
https://git.kernel.org/pub/scm/utils/dtc/dtc.git, so the patch should be rebased against it and sent to [email protected].
Looks like someone independently fixed it upstream:
https://github.com/dgibson/dtc/pull/154
I'm doing final tests now and expect to merge shortly.
Quoted 37 lines
Quoted 36 lines
---
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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));scripts/dtc/pylibfdt/libfdt.i_shipped +1
-1- resultobj = SWIG_Python_AppendOutput(resultobj, buff); + resultobj = SWIG_AppendOutput(resultobj, buff);}
}scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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 };scripts/dtc/pylibfdt/libfdt.i_shipped +0
-0@@ -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); }
}
Signature · 4 lines
David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson
Rob Herring
maintainerQuoted 10 lines · David Gibson
Quoted 8 lines · Xi Ruoyao
Quoted 6 lines · Rudi Heitbaum
Call
SWIG_AppendOutputinstead ofSWIG_Python_AppendOutputso thatis_voidis handled within swig.Signed-off-by Rudi Heitbaum <[email protected]>
Quoted 8 lines
Quoted 3 lines
Dtc is a separate project at
https://git.kernel.org/pub/scm/utils/dtc/dtc.git, so the patch should be rebased against it and sent to [email protected].Looks like someone independently fixed it upstream:
https://github.com/dgibson/dtc/pull/154I'm doing final tests now and expect to merge shortly.
Would be good to tag a release too, so that distros have something to pick up when they update swig.
Rob
Quoted 16 lines · Rob Herring
Quoted 14 lines · David Gibson
Quoted 11 lines · Xi Ruoyao
Quoted 6 lines · Rudi Heitbaum
Call
SWIG_AppendOutputinstead ofSWIG_Python_AppendOutputso thatis_voidis handled within swig.Signed-off-by Rudi Heitbaum <[email protected]>Dtc is a separate project at
https://git.kernel.org/pub/scm/utils/dtc/dtc.git, so the patch should be rebased against it and sent to [email protected].
Quoted 7 lines
Quoted 4 lines
Looks like someone independently fixed it upstream:
https://github.com/dgibson/dtc/pull/154I'm doing final tests now and expect to merge shortly.
Would be good to tag a release too, so that distros have something to pick up when they update swig.
Done.
Signature · 4 lines
David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson