Re: PyArg_ParseTuple question

2010-12-15 Thread Stefan Behnel
Mark Wooding, 14.12.2010 21:42: I could have used PySequence_* functions to read the size and items, but that makes error handling more complicated. One could also borrow the references from the underlying list, which would leave the underlying storage for the vector as the only thing to free.

Re: PyArg_ParseTuple question

2010-12-14 Thread Mark Wooding
Mark Crispin writes: > In a C module, I want to pick up the arguments for a Python call like: > module.call("string1",["string2a", "string2b", "string2c"], "string3") > and stash these into: > char *arg1; > char *arg2[]; > char *arg3; > All arguments are required, and we can

PyArg_ParseTuple question

2010-12-13 Thread Mark Crispin
In a C module, I want to pick up the arguments for a Python call like: module.call("string1",["string2a", "string2b", "string2c"], "string3") and stash these into: char *arg1; char *arg2[]; char *arg3; All arguments are required, and we can assume that the arg2 vector i