How to specify return policy for object returned as part of a tuple in boost python

31 Jan
2011
31 Jan
'11
10:54 p.m.
Hi all, I have a function that creates a C++ object. Before the refactor, I was returning a pointer from the C++ function, and in the boost python wrapper declaration, I would use boost::python::return_value_policy<boost::python::manage_new_object>. Now I need to return not only just the object, but also some error messages, and the refactor basically changes the C++ function to let it return a tuple: boost::python::tuple create_object_from_description(std::string& description) { ... return boost::python::make_tuple(myObject, errmsg); } How should I specify the return policy with this change? Thanks, Eddie
5244
Age (days ago)
5244
Last active (days ago)
0 comments
1 participants
participants (1)
-
Eddie C.