summaryrefslogtreecommitdiff
path: root/src/py_balance.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-11 16:03:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-11 17:02:25 -0400
commitdea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch)
tree7908da76c67ae5172882306a319bf26df81b73b4 /src/py_balance.cc
parentd580079df892c30d023b3211d6c4611c17b11f8f (diff)
downloadfork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip
Untabified all source files
Diffstat (limited to 'src/py_balance.cc')
-rw-r--r--src/py_balance.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/py_balance.cc b/src/py_balance.cc
index 03a73ff6..eba5761d 100644
--- a/src/py_balance.cc
+++ b/src/py_balance.cc
@@ -48,12 +48,12 @@ namespace {
return balance.value(CURRENT_TIME());
}
boost::optional<balance_t> py_value_1(const balance_t& balance,
- commodity_t& in_terms_of) {
+ commodity_t& in_terms_of) {
return balance.value(CURRENT_TIME(), in_terms_of);
}
boost::optional<balance_t> py_value_2(const balance_t& balance,
- commodity_t& in_terms_of,
- datetime_t& moment) {
+ commodity_t& in_terms_of,
+ datetime_t& moment) {
return balance.value(moment, in_terms_of);
}
@@ -64,7 +64,7 @@ namespace {
boost::optional<amount_t>
py_commodity_amount_1(const balance_t& balance,
- const boost::optional<const commodity_t&>& commodity) {
+ const boost::optional<const commodity_t&>& commodity) {
return balance.commodity_amount(commodity);
}
@@ -74,7 +74,7 @@ namespace {
balance.print(outstr);
} else {
PyErr_SetString(PyExc_IOError,
- _("Argument to balance.print_(file) is not a file object"));
+ _("Argument to balance.print_(file) is not a file object"));
}
}
@@ -111,9 +111,9 @@ namespace {
} // unnamed namespace
-#define EXC_TRANSLATOR(type) \
- void exc_translate_ ## type(const type& err) { \
- PyErr_SetString(PyExc_ArithmeticError, err.what()); \
+#define EXC_TRANSLATOR(type) \
+ void exc_translate_ ## type(const type& err) { \
+ PyErr_SetString(PyExc_ArithmeticError, err.what()); \
}
EXC_TRANSLATOR(balance_error)
@@ -162,7 +162,7 @@ void export_balance()
.def("negated", &balance_t::negated)
.def("in_place_negate", &balance_t::in_place_negate,
- return_internal_reference<>())
+ return_internal_reference<>())
.def(- self)
.def("abs", &balance_t::abs)
@@ -173,27 +173,27 @@ void export_balance()
.def("rounded", &balance_t::rounded)
.def("in_place_round", &balance_t::in_place_round,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("truncated", &balance_t::truncated)
.def("in_place_truncate", &balance_t::in_place_truncate,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("floored", &balance_t::floored)
.def("in_place_floor", &balance_t::in_place_floor,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("unrounded", &balance_t::unrounded)
.def("in_place_unround", &balance_t::in_place_unround,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("reduced", &balance_t::reduced)
.def("in_place_reduce", &balance_t::in_place_reduce,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("unreduced", &balance_t::unreduced)
.def("in_place_unreduce", &balance_t::in_place_unreduce,
- return_internal_reference<>())
+ return_internal_reference<>())
.def("value", py_value_0)
.def("value", py_value_1, args("in_terms_of"))