Jeremy Moles <[EMAIL PROTECTED]> writes: > Thanks for the reply. :) > > I may be missing something critical here, but I don't exactly grok what > you're saying; how is it even possible to have two instances of > PyType_vector3d? It is (like all the examples show and all the extension > modules I've done in the past) a static structure declared and assigned > to all at once, only once. > > Am I misunderstanding the point? :) > > /me ducks > > On Thu, 2005-10-06 at 16:26 +0200, Thomas Heller wrote: >> Jeremy Moles <[EMAIL PROTECTED]> writes: >> >> > So, here is my relevant code: >> > >> > PyArg_ParseTuple(args, "O!", &PyType_vector3d, &arg1) >> > >> > And here ismy error message: >> > >> > argument 1 must be pylf.core.vector3d, not pylf.core.vector3d >> >
The only reason that I can think of for this error message is that the type of the argument is something that has a repr of 'pylf.core.vector3d', but the type object is not the same as your 'PyType_vector3d' pointer. As I said, use a source debugger or some other way to find out, or use a debug build of Python and step through the PyArg_ParseTuple code to find out why the call fails. Thomas -- http://mail.python.org/mailman/listinfo/python-list