Re: [C++-sig] copy boost::python::object crashes

2010-01-24 Thread Jim Bosch
On Sun, 2010-01-24 at 09:30 +, sergun wrote: > I have changed setY function to: > void setY(PyObject * y1) { y = object(handle<>(y1)); } > > and it doesn’t make crash now. > I’m not sure that such code has no problems and very interested to know why > assignment of one bp::object to another

Re: [C++-sig] copy boost::python::object crashes

2010-01-24 Thread sergun
Hi Jim, In my opinion “object y;” is just declaration of global object, not static variable of some class (in this case you are right: explicit declaration needed, something like: “object MyStaticClass::y;”). I have changed setY function to: void setY(PyObject * y1) { y = object(handle<>(y1));