diff options
Diffstat (limited to 'lib/libfdt/libfdt.swig')
-rw-r--r-- | lib/libfdt/libfdt.swig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libfdt/libfdt.swig b/lib/libfdt/libfdt.swig index 26d42fc5d6..ce516fddf2 100644 --- a/lib/libfdt/libfdt.swig +++ b/lib/libfdt/libfdt.swig @@ -95,3 +95,15 @@ const char *fdt_get_name(const void *fdt, int nodeoffset, int *OUTPUT); const char *fdt_string(const void *fdt, int stroffset); int fdt_first_subnode(const void *fdt, int offset); int fdt_next_subnode(const void *fdt, int offset); + +%typemap(in) (void *) { + if (!PyByteArray_Check($input)) { + SWIG_exception_fail(SWIG_TypeError, "in method '" "$symname" "', argument " + "$argnum"" of type '" "$type""'"); + } + $1 = PyByteArray_AsString($input); +} + +int fdt_delprop(void *fdt, int nodeoffset, const char *name); + +const char *fdt_strerror(int errval); |