diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/py_amount.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/py_amount.cc b/python/py_amount.cc index 195429a0..372b62f8 100644 --- a/python/py_amount.cc +++ b/python/py_amount.cc @@ -149,9 +149,6 @@ EXC_TRANSLATOR(amount_error) void export_amount() { - scope().attr("AMOUNT_PARSE_NO_MIGRATE") = AMOUNT_PARSE_NO_MIGRATE; - scope().attr("AMOUNT_PARSE_NO_REDUCE") = AMOUNT_PARSE_NO_REDUCE; - class_< amount_t > ("Amount") .def("initialize", &amount_t::initialize) .staticmethod("initialize") @@ -385,6 +382,13 @@ internal precision.") .def("valid", &amount_t::valid) ; + enum_< amount_t::parse_flags_enum_t >("AmountParse") + .value("PARSE_DEFAULT", amount_t::PARSE_DEFAULT) + .value("PARSE_NO_MIGRATE", amount_t::PARSE_NO_MIGRATE) + .value("PARSE_NO_REDUCE", amount_t::PARSE_NO_REDUCE) + .value("PARSE_SOFT_FAIL", amount_t::PARSE_SOFT_FAIL) + ; + register_optional_to_python<amount_t>(); #ifdef HAVE_GDTOA |