oh yes, I feel like an idiot... for anyone as idiotic as me for who finds this post, simply declaring the variable &quot;instantiates it&quot; just like in C... :)<br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 3:25 PM, David P. Novakovic <span dir="ltr">&lt;<a href="mailto:davidnovakovic@gmail.com">davidnovakovic@gmail.com</a>&gt;</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;">I found <a href="http://ldots.org/pyrex-guide/" target="_blank">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...<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">
On Mon, Jul 20, 2009 at 3:17 PM, David P. Novakovic <span dir="ltr">&lt;<a href="mailto:davidnovakovic@gmail.com" target="_blank">davidnovakovic@gmail.com</a>&gt;</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&#39;m trying to create an instance of a struct from an external header:<br><br>cdef exern from &quot;api.h&quot;:<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&#39;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>
</div></div></blockquote></div><br>