[Pyrex] Python/C API or void * problems...

Andreas Kostyrka andreas at mtg.co.at
Sat Nov 1 18:32:47 CET 2003


On Fri, Oct 31, 2003 at 10:41:08PM -0800, Scott Robinson wrote:
> I have a function I'm interfacing similar to the following:
> 
> int process_data (void *data, int data_length)
> 
> How would I pass a Python string to that? I'm trying something like:
cdef extern from "myapp.h":
   int process_data(char *data, int data_len)
   # notice char *

...
process_data(pystr, len(pystr))

Andreas




More information about the Pyrex mailing list