aboutsummaryrefslogtreecommitdiff
path: root/pylibfdt/libfdt.i
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-10-24 19:02:26 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2019-10-27 17:50:53 +0100
commitfdf3f6d897ab8759fb7d7277ba5224beb4727d1d (patch)
tree4217b0e330d62188ef29dcd586a9bdcf6efe8b29 /pylibfdt/libfdt.i
parent430419c28100960c554cf753a5309231c03ec780 (diff)
downloaddtc-fdf3f6d897ab8759fb7d7277ba5224beb4727d1d.zip
dtc-fdf3f6d897ab8759fb7d7277ba5224beb4727d1d.tar.gz
dtc-fdf3f6d897ab8759fb7d7277ba5224beb4727d1d.tar.bz2
pylibfdt: Correct the type for fdt_property_stub()
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 and update the tests. Signed-off-by: Simon Glass <sjg@chromium.org> Message-Id: <20191025010226.34378-1-sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'pylibfdt/libfdt.i')
-rw-r--r--pylibfdt/libfdt.i6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
index feb8c9c..3e09d3a 100644
--- a/pylibfdt/libfdt.i
+++ b/pylibfdt/libfdt.i
@@ -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);
@@ -930,7 +930,7 @@ class FdtSw(FdtRo):
Args:
name: Name of property to add
- val: Value of property
+ val: Value of property (bytes)
quiet: Errors to ignore (empty to raise on all errors)
Raises:
@@ -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.h>