[U-Boot] [PATCH v2 11/15] pylibfdt: Correct the type for fdt_property_stub()

Simon Glass sjg at chromium.org
Fri Oct 25 01:03:53 UTC 2019


This function should use a void * type, not char *. This causes an error:

TypeError: in method 'fdt_property_stub', argument 3 of type 'char const *'

Fix it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 scripts/dtc/pylibfdt/libfdt.i_shipped | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index e2aa7bb01e9..fae0b27d7d0 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -18,7 +18,7 @@
  * a struct called fdt_property. That struct causes swig to create a class in
  * libfdt.py called fdt_property(), which confuses things.
  */
-static int fdt_property_stub(void *fdt, const char *name, const char *val,
+static int fdt_property_stub(void *fdt, const char *name, const void *val,
                              int len)
 {
     return fdt_property(fdt, name, val, len);
@@ -1113,6 +1113,6 @@ int fdt_property_cell(void *fdt, const char *name, uint32_t val);
  * This function has a stub since the name fdt_property is used for both a
   * function and a struct, which confuses SWIG.
  */
-int fdt_property_stub(void *fdt, const char *name, const char *val, int len);
+int fdt_property_stub(void *fdt, const char *name, const void *val, int len);
 
 %include <../libfdt/libfdt.h>
-- 
2.24.0.rc0.303.g954a862665-goog



More information about the U-Boot mailing list