summaryrefslogtreecommitdiff
path: root/src/py_account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-05 02:27:29 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-05 02:27:42 -0500
commit060fc0e00bacb96d1d16163779d98c45c3999014 (patch)
tree1e6c661379f02fdc52ef107fd500438ab69f3e60 /src/py_account.cc
parent8bd16b2e8e61f914767e3d0973e83f7326f11cbc (diff)
downloadfork-ledger-060fc0e00bacb96d1d16163779d98c45c3999014.tar.gz
fork-ledger-060fc0e00bacb96d1d16163779d98c45c3999014.tar.bz2
fork-ledger-060fc0e00bacb96d1d16163779d98c45c3999014.zip
Made many object methods in Python properties
Diffstat (limited to 'src/py_account.cc')
-rw-r--r--src/py_account.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/py_account.cc b/src/py_account.cc
index b0d0a843..8310f5ec 100644
--- a/src/py_account.cc
+++ b/src/py_account.cc
@@ -142,9 +142,10 @@ void export_account()
class_< account_t::xdata_t > ("AccountXData")
#if 1
- .def("flags", &supports_flags<uint_least16_t>::flags)
+ .add_property("flags",
+ &supports_flags<uint_least16_t>::flags,
+ &supports_flags<uint_least16_t>::set_flags)
.def("has_flags", &supports_flags<uint_least16_t>::has_flags)
- .def("set_flags", &supports_flags<uint_least16_t>::set_flags)
.def("clear_flags", &supports_flags<uint_least16_t>::clear_flags)
.def("add_flags", &supports_flags<uint_least16_t>::add_flags)
.def("drop_flags", &supports_flags<uint_least16_t>::drop_flags)
@@ -162,9 +163,10 @@ void export_account()
class_< account_t > ("Account")
#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)