mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 17:32:55 +00:00
Moved to python_v2_API_restructure branch
[SVN r15354]
This commit is contained in:
@@ -22,14 +22,14 @@ double get_fair_value(X const& x) { return x.value(); }
|
||||
|
||||
BOOST_PYTHON_MODULE_INIT(data_members_ext)
|
||||
{
|
||||
class_<X>("X", args<int>())
|
||||
class_<X>("X", init<int>())
|
||||
.def("value", &X::value)
|
||||
.def("set", &X::set)
|
||||
.def_readonly("x", &X::x)
|
||||
.add_property("fair_value", &get_fair_value)
|
||||
;
|
||||
|
||||
class_<Y>("Y", args<int>())
|
||||
class_<Y>("Y", init<int>())
|
||||
.def("value", &Y::value)
|
||||
.def("set", &Y::set)
|
||||
.def_readwrite("x", &Y::x)
|
||||
|
||||
Reference in New Issue
Block a user