From 04853cad18f423647d283062d1cb98f63c401720 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 27 Aug 2018 11:36:28 +1000 Subject: pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap In libfdt.i we set the handling of uint64_t parameters to use PyLong_AsUnsignedLong. But for 32-bit platforms, where an unsigned long is 32-bits, this will truncate the value we need. It turns out swig's default typemapping for uint64_t correctly handles conversions both to python ints and python longs, so we don't need this typemap at all. Signed-off-by: David Gibson --- pylibfdt/libfdt.i | 5 ----- 1 file changed, 5 deletions(-) (limited to 'pylibfdt') diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i index fc53a8c..1bbc5e3 100644 --- a/pylibfdt/libfdt.i +++ b/pylibfdt/libfdt.i @@ -1049,11 +1049,6 @@ typedef uint32_t fdt32_t; $1 = PyString_AsString($input); /* char *str */ } -/* typemap used for fdt_add_reservemap_entry() */ -%typemap(in) uint64_t { - $1 = PyLong_AsUnsignedLong($input); -} - /* typemaps used for fdt_next_node() */ %typemap(in, numinputs=1) int *depth (int depth) { depth = (int) PyInt_AsLong($input); -- cgit v1.1