[Pyrex] Pyrex and char *x[]

Georg Grabler ggrabler at gmail.com
Wed May 16 05:29:41 UTC 2007


Hello everybody.

I want an array to be passed to a function, so basically i started the
function as follows:

def addToList (self, char *array[]):
  ....

This throws an error compiling:
"Cannot convert Python object argument to type 'char(*(*))'"

So, what i want:
Basically, it's a function called by python. This function shall step trough
the elements of the array, and call another function:
def addList(self, char *str):
  ...

Calling the addList function directly works properly, the function extends a
C list for the object. Now i want a function adding the whole array to a
the list, using the 2nd function.

Does anyone of you have an idea how to archive this? Using ArrayType suggested 
in the list archives did not work out
def addToList(self, ArrayType x):

complains about a missing ) by parsing the pyrex code.

Thank you,
Georg



More information about the Pyrex mailing list