[C++-sig] missing boost::ref in pyste generated code?
giulio.eulisse at cern.ch
Mon Jun 2 09:48:53 CEST 2003
> >as it seem to pass Ev by value, instead of passing it by reference.
> >We fixed it by adding boost::ref where indicated in the sourcecode as
> >otherwise it tries to pass things by value. Is this a bug or am I doing
> >something wrong?
> Sorry for missing this post, Giulio!
> Pyste doesn't do it because it's not safe, otherwise Boost.Python would
> do that by default. Dave can elaborate better on that.
Ok, but how do I do it then? Modifing generated .cc code? In my case
that is not an option as generated C++ code is temporary and any
modification to it is lost after "make clean" (and I cannot change this
behaviour). It would be very nice (not to say "essential", in my case)
to have some way to force the use of boost::ref. Maybe it is dangerous
and pyste/boost cannot tell whether someone will destroy the referent or
not, but having it as an option would still be useful. Let me decide if
I want to take the risk, please...;-)And no, I cannot modify the
interfaces to pass a shared_ptr.
BTW, some time ago I send you a simple snippet of code with which I work
around unnamed enum problem, have you had any opportunity to look at it?
More information about the Cplusplus-sig