* [PATCH] pylibfdt: Add stdint include to fix uint32_t
@ 2017-08-14 19:07 Simon Glass
[not found] ` <20170814190728.151775-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2017-08-14 19:07 UTC (permalink / raw)
To: Devicetree Compiler; +Cc: David Gibson, Simon Glass
Some types used by libfdt.h are not understood the Python module since
they are defined outside it. An example is an attempt to do this:
import libfdt
result = libfdt.fdt_node_offset_by_phandle(fdt, phandle)
This results in:
TypeError: in method 'fdt_node_offset_by_phandle', argument 2 of
type 'uint32_t'
Include the standard integer header file to fix this.
Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
pylibfdt/libfdt.i | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
index cd1c6a9..c7b79ec 100644
--- a/pylibfdt/libfdt.i
+++ b/pylibfdt/libfdt.i
@@ -52,6 +52,8 @@
%module libfdt
+%include <stdint.i>
+
%{
#define SWIG_FILE_WITH_INIT
#include "libfdt.h"
--
2.14.0.434.g98096fd7a8-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pylibfdt: Add stdint include to fix uint32_t
[not found] ` <20170814190728.151775-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2017-08-15 3:47 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2017-08-15 3:47 UTC (permalink / raw)
To: Simon Glass; +Cc: Devicetree Compiler
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
On Mon, Aug 14, 2017 at 01:07:28PM -0600, Simon Glass wrote:
> Some types used by libfdt.h are not understood the Python module since
> they are defined outside it. An example is an attempt to do this:
>
> import libfdt
> result = libfdt.fdt_node_offset_by_phandle(fdt, phandle)
>
> This results in:
>
> TypeError: in method 'fdt_node_offset_by_phandle', argument 2 of
> type 'uint32_t'
>
> Include the standard integer header file to fix this.
>
> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Applied, but it would be nice to add a testcase for this.
> ---
>
> pylibfdt/libfdt.i | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
> index cd1c6a9..c7b79ec 100644
> --- a/pylibfdt/libfdt.i
> +++ b/pylibfdt/libfdt.i
> @@ -52,6 +52,8 @@
>
> %module libfdt
>
> +%include <stdint.i>
> +
> %{
> #define SWIG_FILE_WITH_INIT
> #include "libfdt.h"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-15 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-14 19:07 [PATCH] pylibfdt: Add stdint include to fix uint32_t Simon Glass
[not found] ` <20170814190728.151775-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-08-15 3:47 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).