The object was declared in the class and instantiated when an instance of that object is created. It wasn't a pointer I failed to construct. I managed to screw around with the Python documentation awhile and get something like this working:
boost::python::handle<> mainHandle(boost::python::borrowed(PyImport_AddModule("__main__"))); boost::python::object mainModule(mainHandle); boost::python::scope mainScope(mainModule); boost::python::object main_namespace = mainModule.attr("__dict__"); boost::python::object scripting_module( (handle<>(PyImport_ImportModule("scripting_synchronization"))) ); mainModule.attr("runtime") = ptr(&embeddedSync); So it popped up in my main namespace as an object named "runtime." On Tue, May 29, 2012 at 12:03 PM, Niall Douglas <s_sourcefo...@nedprod.com>wrote: > You're passing a null object pointer, so BPL correctly fails an > assertion check? > > Niall > >
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig