[C++-sig] Assert's in boost.python when instanciating class

David Abrahams dave at boost-consulting.com
Tue May 6 13:11:48 CEST 2003


Of course I meant to surround the class_<...> part with the
BOOST_PYTHON_MODULE thing


// C++ code
#include <boost/python.hpp>
using namespace boost::python;
struct SimpleTest
{
	int val;
};

BOOST_PYTHON_MODULE(payamodule)
{

 class_<SimpleTest>("SimpleTest")
 	.def_readwrite("val",  &SimpleTest::val)
 ;

}


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list