Re: [C++-sig] Custom smart pointer and bp::wrapper

2009-01-17 Thread Roman Yakovenko
2009/1/17 Paul Melis : > But when trying to run > > import doh > > class MyCallback(doh.Callback): >def execute(self, t): >print t >return 1 > > m = MyCallback() > > t = doh.Thing() > t.setCallback(m) > t.update() > > i'm getting > > Traceback (most recent call last): > File "n

[C++-sig] Custom smart pointer and bp::wrapper

2009-01-17 Thread Paul Melis
Given two reference-counted classes Thing and Callback, and using a custom smart pointer ref_ptr, with all the needed pointee stuff added and using ref_ptr<..> as held type I'm getting into trouble when trying to use a boost::python::wrapper<> derived class. See the attached files for the complete

Re: [C++-sig] call Python function from C++ without copying the arguments

2009-01-17 Thread David Abrahams
on Sat Jan 17 2009, "Sebastian Walter" wrote: > Hello, > > I want to call a Python function from C++ with an object of a C++ class > as argument. > The Python-function should change the argument, so changes are visible > on the C++ side. > Boost::Python automatically makes a copy of all the arg

[C++-sig] call Python function from C++ without copying the arguments

2009-01-17 Thread Sebastian Walter
Hello, I want to call a Python function from C++ with an object of a C++ class as argument. The Python-function should change the argument, so changes are visible on the C++ side. Boost::Python automatically makes a copy of all the arguments that are passed to a callable Python object. Is there a