C++ extension problem

pythoncurious at gmail.com pythoncurious at gmail.com
Tue Apr 17 11:16:54 EDT 2007


On Apr 16, 11:44 pm, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
> > Now this is what confuses me: Why does it say that I have the wrong
> > type when it's the same type as it suggests?
>
> When referring to the type, you must *always* form the address of the
> type structure, including, but not limited to, the line
>
> >     if (!PyArg_ParseTuple(args, "O!", SillyStringType, &o))
>
> HTH,
> Martin


Yes, that did help. Thanks.
I assumed that the compiler would warn me about that kind of problem,
but I know better know. :)
Still, the error message is somewhat confusing.








More information about the Python-list mailing list