[Pyrex] Re: [newbie] 3 errors need help

Test Drive testdrive6 at gmail.com
Wed Dec 21 06:07:31 CET 2005


Hi Toby,

basically that was the silliest part.
i failed to notice that i have 3 underscores instead of 2 in the original
declararion.
i notices it very late.

thx
//TD

On 12/20/05, Toby <tobia.conforto at linux.it> wrote:
>
> Why is your variable called __Session__ in one place and ___Session___
> (with three underscores) in another?
>
> Try also  &(self.__Session__)  instead of  &self.__Session__
>
> Second issue: you can't convert a Python string into a C String simply
> by doing  <unsigned char *>self.Key  you need to allocate space for the
> C string and copy it over, like:
>
>         cdef unsigned char c_key[MAX_SOMETHING]
>         c_key = self.Key
>
> Take care to allocate space in a way that's compatible with the expected
> longevity of the C string.
>
>
> I'm a newbie as well, so this could all be wrong :)
>
>
> Toby
>
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20051221/92130d26/attachment.html


More information about the Pyrex mailing list