[C++-sig] Typecasting

Stefan Seefeld seefeld at sympatico.ca
Thu Dec 14 17:34:43 CET 2006


David Sveningsson wrote:

> The biggest problem right now seems to be that when I call
> "this->get_override("notify")(evt);" the instance is copied. Since it
> refers to a Object baseclass thats what you get in python. But the
> object class does not contain anything. Is there some way to call python
> with a reference to the real instance?
> 

I believe

this->get_override("notify")(boost::python::ptr(evt));

should do the trick.

HTH,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list