summaryrefslogtreecommitdiff
path: root/src/py_commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-05 04:24:15 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-05 04:24:15 -0500
commit15555d497f56e4b4d39e9a14f74b2c82cce52b90 (patch)
tree1e6c661379f02fdc52ef107fd500438ab69f3e60 /src/py_commodity.cc
parent94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f (diff)
parent060fc0e00bacb96d1d16163779d98c45c3999014 (diff)
downloadfork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.tar.gz
fork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.tar.bz2
fork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.zip
Merge branch 'next'
Diffstat (limited to 'src/py_commodity.cc')
-rw-r--r--src/py_commodity.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/py_commodity.cc b/src/py_commodity.cc
index c0412a45..c20053ad 100644
--- a/src/py_commodity.cc
+++ b/src/py_commodity.cc
@@ -130,12 +130,12 @@ void export_commodity()
class_< commodity_pool_t, boost::noncopyable > ("CommodityPool", no_init)
.add_property("null_commodity",
make_getter(&commodity_pool_t::null_commodity,
- return_value_policy<reference_existing_object>()),
+ return_internal_reference<>()),
make_setter(&commodity_pool_t::null_commodity,
with_custodian_and_ward<1, 2>()))
.add_property("default_commodity",
make_getter(&commodity_pool_t::default_commodity,
- return_value_policy<reference_existing_object>()),
+ return_internal_reference<>()),
make_setter(&commodity_pool_t::default_commodity,
with_custodian_and_ward<1, 2>()))
@@ -189,9 +189,10 @@ void export_commodity()
class_< commodity_t, boost::noncopyable > ("Commodity", no_init)
#if 1
- .def("flags", &delegates_flags<uint_least16_t>::flags)
+ .add_property("flags",
+ &supports_flags<uint_least16_t>::flags,
+ &supports_flags<uint_least16_t>::set_flags)
.def("has_flags", &delegates_flags<uint_least16_t>::has_flags)
- .def("set_flags", &delegates_flags<uint_least16_t>::set_flags)
.def("clear_flags", &delegates_flags<uint_least16_t>::clear_flags)
.def("add_flags", &delegates_flags<uint_least16_t>::add_flags)
.def("drop_flags", &delegates_flags<uint_least16_t>::drop_flags)
@@ -248,9 +249,9 @@ void export_commodity()
class_< annotation_t > ("Annotation", no_init)
#if 1
- .def("flags", &supports_flags<>::flags)
+ .add_property("flags", &supports_flags<>::flags,
+ &supports_flags<>::set_flags)
.def("has_flags", &supports_flags<>::has_flags)
- .def("set_flags", &supports_flags<>::set_flags)
.def("clear_flags", &supports_flags<>::clear_flags)
.def("add_flags", &supports_flags<>::add_flags)
.def("drop_flags", &supports_flags<>::drop_flags)