[C++-sig] Re: Problem using wrapped void* in Python
Niall Douglas
s_sourceforge at nedprod.com
Tue Dec 2 14:01:48 CET 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1 Dec 2003 at 6:01, David Abrahams wrote:
> > Does anyone have something to say about converting void* to Python
> > and back?
>
> If you want it to appear to be an attribute in Python, just write a
> getter (and optional setter) function using the "opaque void_*"
> technique, and use class_<...>.add_property("name", getter, setter) to
> expose it.
I was just about to say that this solution is also in the FAQ, but
Dave's beaten me to it!
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP8yNPcEcvDLFGKbPEQL7YACglIS3dPRfK0KIMNr3eNC006vbUjgAoLzs
unCEMHZMSIUZzAVFdAnomcyk
=0vLx
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list