Hi,
I have a c++ class which uses boost::thread and boost::mutex.
I cannot expose this class directly with boost::python, since mutex is
non-copyable.
so I did this:
/////////////////////////// C++
class ResourceManager
{};
ResourceManager* ResourceManagerFactory()
{
return new ResourceManager();
}
def("ResourceManagerFactory", ResourceManagerFactory,
return_value_policy<manage_new_object>());
////////////////////
This compiles but I at python runtime I get:
##### PYTHON
self.resourceManager = ResourceManagerFactory()
TypeError: No Python class registered for C++ class class ResourceManager
#####
Am I doing this wrong? Wrong return policy?
Thanks
Simon
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig