devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: [PATCH] pylibfdt: Add stdint include to fix uint32_t
Date: Mon, 14 Aug 2017 13:07:28 -0600	[thread overview]
Message-ID: <20170814190728.151775-1-sjg@chromium.org> (raw)

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

             reply	other threads:[~2017-08-14 19:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 19:07 Simon Glass [this message]
     [not found] ` <20170814190728.151775-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-08-15  3:47   ` [PATCH] pylibfdt: Add stdint include to fix uint32_t David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170814190728.151775-1-sjg@chromium.org \
    --to=sjg-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).