I found <a href="http://ldots.org/pyrex-guide/">http://ldots.org/pyrex-guide/</a> which alerted me to being able to use NULL ... still trying to figure out how to create an instance of the struct...<br><br><div class="gmail_quote">
On Mon, Jul 20, 2009 at 3:17 PM, David P. Novakovic <span dir="ltr"><<a href="mailto:davidnovakovic@gmail.com">davidnovakovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey,<br><br><br>i'm trying to create an instance of a struct from an external header:<br><br>cdef exern from "api.h":<br> ctypedef struct foo_config:<br> int member_1<br> ...<br><br><br>cdef class Session:<br>
foo_config config<br> <br> def __init__(self):<br> self.config = foo_config()<br><br><br><br><br>Also, I need to create a void pointer for a struct and pass that into the c library so it can create an instance of a struct in the memory, I can't see a way of doing this.. when i try and assign None to an uninitialised variable the cython compiler complains about a type mismatch.<br>
<br>Any help would be greatly appreciated :)<br><font color="#888888"><br><br>David<br>
</font></blockquote></div><br>