[C++-sig] Re: to_python (by-value) converter
Simon Ouellet
simon.ouellet at orthosoft.ca
Fri Sep 12 16:44:40 CEST 2003
>
> Try executing class_<CppDerived>("CppDerived"); before then.
>
Ok I make it work, but that lead me to another question.
When I put
class_<CppDerived>("CppDerived");
in the module definition. Like this
BOOST_PYTHON_MODULE(embedded_hello)
{
python::class_<Base, BaseWrap, boost::noncopyable>("Base")
;
python::class_<CppDerived>("CppDerived")
.def("hello", &CppDerived::hello);
}
It didn't work but if I put it before I use the conversion like this:
python::class_<CppDerived>("CppDerived")
.def("hello", &CppDerived::hello);
CppDerived b;
It work.
It is a scope issue? What I'm missing?
Thanks
--
_________________________________________________________
Simon Ouellet email: simon.ouellet at orthosoft.ca
Programmeur tel: 514-861-4074 #269
Orthosoft Inc. fax: 514-866-2197
More information about the Cplusplus-sig
mailing list