Function pointer argument to function template

Kirk McDonald kirklin.mcdonald at gmail.com
Wed May 31 04:00:44 PDT 2006


Daniel Keep wrote:
> I actually came up with this because I want to find a way to do
> Boost-style Python embedding.  So you can just use PyWrap(someFn) to
> generate a Python wrapper for any old D function.
> 
> *drools at the thought of D+Python*  Oops *mops up puddle*
> 
> 	-- Daniel
> 

Ha! Why do you think I'm asking about this? Also note my earlier thread 
asking about the state of the Python/D API.

I would love to see your code for PyWrap. I've got most of a wrapper 
around PyObject already. The biggest thing missing (beyond finishing 
wrapping Python's object interface, which is pretty trivial) is a 
translator between Python and D exceptions, which requires something 
like PyWrap to truly function (so it can catch any uncaught D exceptions 
and safely pass them back into Python). (Yes, this IS how Boost.Python 
does it, if you're wondering.) :-)

-Kirk McDonald



More information about the Digitalmars-d mailing list