diff options
Diffstat (limited to 'py_amount.cc')
-rw-r--r-- | py_amount.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py_amount.cc b/py_amount.cc index 6b13c9af..607d0be5 100644 --- a/py_amount.cc +++ b/py_amount.cc @@ -46,11 +46,11 @@ commodity_t * py_find_commodity(const string& symbol) } #define EXC_TRANSLATOR(type) \ - void exc_translate_ ## type(const type * const err) { \ - PyErr_SetString(PyExc_ArithmeticError, err->what()); \ + void exc_translate_ ## type(const type& err) { \ + PyErr_SetString(PyExc_ArithmeticError, err.what()); \ } -EXC_TRANSLATOR(amount_error) +EXC_TRANSLATOR(amount_exception) void export_amount() { @@ -236,7 +236,7 @@ void export_amount() ; #define EXC_TRANSLATE(type) \ - register_exception_translator<type *>(&exc_translate_ ## type); + register_exception_translator<type>(&exc_translate_ ## type); - EXC_TRANSLATE(amount_error); + EXC_TRANSLATE(amount_exception); } |