summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/pylibfdt/libfdt.i_shipped6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index e4659489a96..326a15c7941 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -1033,7 +1033,7 @@ typedef uint32_t fdt32_t;
PyObject *buff;
if ($1) {
- resultobj = PyString_FromString(
+ resultobj = PyUnicode_FromString(
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
buff = PyByteArray_FromStringAndSize(
(const char *)($1 + 1), fdt32_to_cpu($1->len));
@@ -1064,13 +1064,13 @@ typedef uint32_t fdt32_t;
}
$1 = PyBytes_AsString($input);
%#else
- $1 = PyString_AsString($input); /* char *str */
+ $1 = PyBytes_AsString($input); /* char *str */
%#endif
}
/* typemaps used for fdt_next_node() */
%typemap(in, numinputs=1) int *depth (int depth) {
- depth = (int) PyInt_AsLong($input);
+ depth = (int) PyLong_AsLong($input);
$1 = &depth;
}