[C++-sig] problem with scope().attr(xxx)
Nicolas LELONG
nlelong at mgdesign.org
Fri Oct 17 11:47:03 CEST 2003
Hello,
I did not update the BPL code I use since August (nor did I really follow
the evolutions), and monday I decided to grab the lastest CVS (as of
monday). I'm now having problems with some 'global' variables declarations
that worked previously.
The minimal code I use is the following :
class Test
{
};
Test test;
BOOST_PYTHON_MODULE( aaa )
{
class_<Test, boost::noncopyable>("Test", no_init);
scope().attr("test") = boost::ref(test);
}
which worked OK previously - now the scope().attr line raises an error "No
to_python (by-value) converter found for C++ type" ! I've noticed that if if
I remove the boost::noncopyable from the 'class_' instanciation, it all
works ok.
I was wondering if this was a normal 'new' behaviour or not ? if it is
normal, how can I expose my global noncopyable instances to python ?
Thanks,
Nicolas.
More information about the Cplusplus-sig
mailing list