From 21af83013f3b1bae511a61b9e27224ab3de235c1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 30 Apr 2007 11:22:08 +0000 Subject: Did more work on the utility code. --- src/py_amount.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/py_amount.cc') diff --git a/src/py_amount.cc b/src/py_amount.cc index 1d9f9255..059322f1 100644 --- a/src/py_amount.cc +++ b/src/py_amount.cc @@ -1,10 +1,12 @@ #include "pyinterp.h" #include "amount.h" -using namespace boost::python; +#include namespace ledger { +using namespace boost::python; + int py_amount_quantity(amount_t& amount) { std::ostringstream quant; @@ -51,7 +53,7 @@ commodity_t * py_find_commodity(const string& symbol) PyErr_SetString(PyExc_ArithmeticError, err.what()); \ } -EXC_TRANSLATOR(amount_exception) +EXC_TRANSLATOR(amount_error) void export_amount() { @@ -236,10 +238,10 @@ void export_amount() #endif ; -#define EXC_TRANSLATE(type) \ +#define EXC_TRANSLATE(type) \ register_exception_translator(&exc_translate_ ## type); - EXC_TRANSLATE(amount_exception); + EXC_TRANSLATE(amount_error); } } // namespace ledger -- cgit v1.2.3