On Jan 28, 10:10 am, Christian Meesters <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to write a C-extension function for an application of mine. For > this I need to pass a nested list (like: [[a, b, c], [d, e, f], ...], where > all letters are floats) to the C-function. Now, with the code I have the > compiler is complaining: "subscripted value is neither array nor pointer". > Can somebody tell me what's wrong?
Well, it's pretty clear: you misspelt "length" as "lenght". :) PySequence_Fast doesn't return an array: it returns a PyObject---in this case, a PyObject corresponding to a Python tuple. As the compiler says, a PyObject is neither an array nor a pointer, so when you write dummy_list[i] the compiler doesn't know what you mean. You probably want to use PySequence_Fast_GET_ITEM. See the documentation at http://docs.python.org/api/sequence.html#l2h-333 Mark -- http://mail.python.org/mailman/listinfo/python-list