[C++-sig] Methods returning & taking pointers to functions
Niall Douglas
s_sourceforge at nedprod.com
Fri Oct 3 21:10:56 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I /think/ these don't compile properly ie; lots of compiler warnings.
Unfortunately a mechanism of specifying a sort function is
commonplace in my library and ultimately I'll really need it.
I see a two pronged approach: (i) make a pointer to a function an
opaque type and (ii) write a thunk which invokes an arbitrary python
function. The latter, through some small alterations to the base
library, could be entirely driven by parameters (all I need is a
pointer to the thing calling the sort function).
Has anyone else tried this? Is it even possible? If BP can't wrap
methods taking or receiving pointers to functions, then it's a non-
starter.
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP33JwMEcvDLFGKbPEQLAUQCg5HZYHSfEoFMjUN9Uq9MNA0yFXUwAniw6
wcAF1+KWqamVc841o1Xt1k9P
=gNBi
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list