Converting void * to PyObject * in Pyrex
Ganesan R
rganesan at myrealbox.com
Fri Mar 14 00:02:52 EST 2003
More information about the Python-list mailing list
Fri Mar 14 00:02:52 EST 2003
- Previous message (by thread): Excel COM automation
- Next message (by thread): Converting void * to PyObject * in Pyrex
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>>>> "Ganesan" == Ganesan R <rganesan at myrealbox.com> writes: > cdef SLPBoolean MySLPSrvTypeCallback(SLPHandle slph, char *srvtype, > SLPError errcode, void *cookie): > srvtypelist = <PyObject *>cookie > if errcode == SLP_OK: > srvtypelist.append(srvtype) > elif errcode == SLP_LAST_CALL: > pass > else: > raise SLPException(errcode) > return SLP_TRUE > ------- > cookie is really a python list cast to void *. Pyrex complains: > /home/rganesan/sf/openslp/pyrex/slp.pyx:40:28: Declarator should be empty > /home/rganesan/sf/openslp/pyrex/slp.pyx:40:28: Expected '>' > How do I fix this? Never mind. I figured it out myself. I needed to do srvtypelist = <object>cookie Ganesan -- Ganesan R
- Previous message (by thread): Excel COM automation
- Next message (by thread): Converting void * to PyObject * in Pyrex
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list