C structure in the Python extension

Dave win wcn93 at cs.ccu.edu.tw
Mon Jan 10 08:28:26 EST 2005


Howdy:
	When I was writting interface functions of the extending python,      I
meet a question. As I using the  "PyArg_ParseTuple(args,arg_type,...)"
function call, if I wanna use the personal defined argument, such as the
C structure which I made. How to make it?

static PyObject* Call_V_ABSUB(PyObject *self, PyObject* args){
          myStruct FU;
          myStruct result;
          if(!PyArg_ParseTuple(args,"O&",&FU)) return NULL;
				     ^^^^^^^
				     How to modify here???
          V_ABSUB(FU);

          return Py_BuildValue("i",result);
}




Thx.

Dave.



More information about the Python-list mailing list