summaryrefslogtreecommitdiff
path: root/py_amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:08:42 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:31 -0400
commit0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (patch)
tree750d64f6817282a6f4744058f73164a2996f6b03 /py_amount.cc
parentd01629148383261d7944e91fd2ac67b334a6834d (diff)
downloadledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.gz
ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.bz2
ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.zip
Restructured the code to use the new utility code in utils.h.
Diffstat (limited to 'py_amount.cc')
-rw-r--r--py_amount.cc10
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);
}