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 <david@gibson.dropbear.id.au>
This commit is contained in:
@@ -1049,11 +1049,6 @@ typedef uint32_t fdt32_t;
|
|||||||
$1 = PyString_AsString($input); /* char *str */
|
$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() */
|
/* typemaps used for fdt_next_node() */
|
||||||
%typemap(in, numinputs=1) int *depth (int depth) {
|
%typemap(in, numinputs=1) int *depth (int depth) {
|
||||||
depth = (int) PyInt_AsLong($input);
|
depth = (int) PyInt_AsLong($input);
|
||||||
|
|||||||
Reference in New Issue
Block a user