8 Jan
2010
8 Jan
'10
6:03 p.m.
Gabriel Genellina, 08.01.2010 17:45:
I want to create an instance given its type object. I expected that calling the type would be enough, something like this:
obj = (MyFooObject *) PyObject_CallFunctionObjArgs(&MyFooType, other, arguments, NULL)
but it doesn't work (nor even compiles, I think).
You think? Didn't you try it?
You might have to cast the type pointer to PyObject* to make it work.
Stefan