summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-11-26 12:52:12 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-11-26 12:52:12 -0600
commit3445ddec096799168e8a12e96b22bcdc1c8d8cde (patch)
tree634bf21a298f750302e13ca218a1b06726fe4253 /src
parent2ac996d9165f87754077a937eb69d765e139c05b (diff)
parentf27a9d7e9836a268cb810bb20183c6e73b160f99 (diff)
downloadfork-ledger-3445ddec096799168e8a12e96b22bcdc1c8d8cde.tar.gz
fork-ledger-3445ddec096799168e8a12e96b22bcdc1c8d8cde.tar.bz2
fork-ledger-3445ddec096799168e8a12e96b22bcdc1c8d8cde.zip
Merge branch 'next' of github.com:ledger/ledger into next
Diffstat (limited to 'src')
-rw-r--r--src/py_xact.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/py_xact.cc b/src/py_xact.cc
index 3d792c7b..96674207 100644
--- a/src/py_xact.cc
+++ b/src/py_xact.cc
@@ -119,8 +119,8 @@ void export_xact()
.def("__str__", py_xact_to_string)
.add_property("code",
- make_getter(&xact_t::code),
- make_setter(&xact_t::code))
+ make_getter(&xact_t::code, return_value_policy<return_by_value>()),
+ make_setter(&xact_t::code, return_value_policy<return_by_value>()))
.add_property("payee",
make_getter(&xact_t::payee),
make_setter(&xact_t::payee))
@@ -157,6 +157,8 @@ void export_xact()
make_getter(&period_xact_t::period_string),
make_setter(&period_xact_t::period_string))
;
+
+ register_optional_to_python<std::string>();
}
} // namespace ledger