[C++-sig] Getting address of wrapped instance?

2008-12-08 Thread pyplusplus
Is there are way to get the address of the C++ instance pointed to by a given Boost.Python wrapper object? I don't need a real pointer, the address alone suffices. The use case is to deduce interrelations between C++ objects (think a DAG) from Python. As different Python wrapper objects might refe

Re: [C++-sig] Custom from-python converter (almost working)

2008-12-08 Thread pyplusplus
Dang, my mailer got in the way and sent this before I finished it ... > Hi, > >>> void >>> p(vec3f *v) >>> { >>> printf("%f, %f, %f\n", v->x, v->y, v->z); >>> } >> >> This is indeed not supported, since it would require "converters with >> write-back". > > Ok, that makes sense. > >> vec3f cons

Re: [C++-sig] Custom from-python converter (almost working)

2008-12-08 Thread pyplusplus
Hi, >> void >> p(vec3f *v) >> { >> printf("%f, %f, %f\n", v->x, v->y, v->z); >> } > > This is indeed not supported, since it would require "converters with > write-back". Ok, that makes sense. > vec3f const* v > > should work, but > > ve3f* v > > doesn't because the missing const indicates t

[C++-sig] Custom from-python converter (almost working)

2008-12-05 Thread pyplusplus
I'm trying to add some custom from-python converters to my bindings (see code at the end of the mail). These basically should convert Python 3-tuples of floats to a C++ vec3f instance. I can't seem to find reference docs on classes related to conversion, e.g. boost::python::converter::registry, so