summaryrefslogtreecommitdiff
path: root/src/py_item.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-29 15:56:05 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-29 15:56:05 -0500
commit7422fa5f3e2505dfa8f5494e4ce9e987440a57a1 (patch)
treec655ffd469f240c70393aae25d7af98b362e588b /src/py_item.cc
parent08f65eeadc288ecde4b8fb281e477958c8ae7cd5 (diff)
downloadfork-ledger-7422fa5f3e2505dfa8f5494e4ce9e987440a57a1.tar.gz
fork-ledger-7422fa5f3e2505dfa8f5494e4ce9e987440a57a1.tar.bz2
fork-ledger-7422fa5f3e2505dfa8f5494e4ce9e987440a57a1.zip
Allow post.cost to work in Python
Diffstat (limited to 'src/py_item.cc')
-rw-r--r--src/py_item.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/py_item.cc b/src/py_item.cc
index e3e49457..893ddcfa 100644
--- a/src/py_item.cc
+++ b/src/py_item.cc
@@ -120,14 +120,20 @@ void export_item()
#endif
.add_property("note",
- make_getter(&item_t::note),
- make_setter(&item_t::note))
+ make_getter(&item_t::note,
+ return_value_policy<return_by_value>()),
+ make_setter(&item_t::note,
+ return_value_policy<return_by_value>()))
.add_property("pos",
- make_getter(&item_t::pos),
- make_setter(&item_t::pos))
+ make_getter(&item_t::pos,
+ return_value_policy<return_by_value>()),
+ make_setter(&item_t::pos,
+ return_value_policy<return_by_value>()))
.add_property("metadata",
- make_getter(&item_t::metadata),
- make_setter(&item_t::metadata))
+ make_getter(&item_t::metadata,
+ return_value_policy<return_by_value>()),
+ make_setter(&item_t::metadata,
+ return_value_policy<return_by_value>()))
.def("copy_details", &item_t::copy_details)