[C++-sig] error in argument conversion

Stefan Seefeld seefeld at sympatico.ca
Sun Jan 23 05:07:00 CET 2005


Finally:

The issue is related to the fact that the factory of the initial PTree.List
object I encountered the exceptions on is implemented in a separate extension.

I thus have one extension 'PTree.so' that provides the definitions of types
'Node' and 'List', and a 'Parser.so' extension that provides 'parse':

PTree::Node *parse(std::string const &filename);

...

BOOST_PYTHON_MODULE(Parser)
{
   // The PTree module uses garbage collection so just ignore memory management,
   // at least for now.
   bpl::def("parse", parse, bpl::return_value_policy<bpl::reference_existing_object>());
}

As soon as I merge both into a single extension module everything works as expected.
But when using separate modules 'Parser' and 'PTree' I run into problems with
'by-value' conversions for type PTree::List.
What is going on here ?

Thanks,
		Stefan





More information about the Cplusplus-sig mailing list