Hi Toby,<br>
<br>
basically that was the silliest part.<br>
i failed to notice that i have 3 underscores instead of 2 in the original declararion.<br>
i notices it very late.<br>
<br>thx<br>
//TD<br><br><div><span class="gmail_quote">On 12/20/05, <b class="gmail_sendername">Toby</b> &lt;<a href="mailto:tobia.conforto@linux.it">tobia.conforto@linux.it</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why is your variable called __Session__ in one place and ___Session___<br>(with three underscores) in another?<br><br>Try also&nbsp;&nbsp;&amp;(self.__Session__)&nbsp;&nbsp;instead of&nbsp;&nbsp;&amp;self.__Session__<br><br>Second issue: you can't convert a Python string into a C String simply
<br>by doing&nbsp;&nbsp;&lt;unsigned char *&gt;self.Key&nbsp;&nbsp;you need to allocate space for the<br>C string and copy it over, like:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cdef unsigned char c_key[MAX_SOMETHING]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c_key = self.Key<br><br>Take care to allocate space in a way that's compatible with the expected
<br>longevity of the C string.<br><br><br>I'm a newbie as well, so this could all be wrong :)<br><br><br>Toby<br><br>_______________________________________________<br>Pyrex mailing list<br><a href="mailto:Pyrex@lists.copyleft.no">
Pyrex@lists.copyleft.no</a><br><a href="http://lists.copyleft.no/mailman/listinfo/pyrex">http://lists.copyleft.no/mailman/listinfo/pyrex</a><br></blockquote></div><br>