Thanks Fredrik. Yes, I see now how the function works. I'm new to
Python and the book I'm studying out of wasn't too explicit in how to
handle arrays. I've changed the code to what you suggested, but
strangely enough nothing got read into my array. If I return a single
integer from my Python method
[EMAIL PROTECTED] wrote:
> I am returning a tuple from my python method and am stuck trying to
> figure out how to read it into a C array using PyArg_Parse.
> My C Code:
> int array[3];
> PyArg_Parse(return, "(iii)", &array);
>
> My Python Code:
> mytuple = (1,2,3)
> return mytuple
>
> That gives
I am returning a tuple from my python method and am stuck trying to
figure out how to read it into a C array using PyArg_Parse.
My C Code:
int array[3];
PyArg_Parse(return, "(iii)", &array);
My Python Code:
mytuple = (1,2,3)
return mytuple
That gives me a segmentation fault. What am I doing wrong