From e414123ecb472d1f86a2f1cfdbd2732144c20f0d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 10 Sep 2004 05:07:50 -0400 Subject: change commodity->symbol to const, and added set_symbol --- amount.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'amount.cc') diff --git a/amount.cc b/amount.cc index 1e7c6d5c..181f73da 100644 --- a/amount.cc +++ b/amount.cc @@ -1120,9 +1120,8 @@ void export_amount() class_< commodity_t > ("Commodity") .def(init >()) - // make this a function which called check_symbol after being set - .def_readwrite("symbol", &commodity_t::symbol) - .def_readwrite("quote", &commodity_t::quote) + .def_readonly("symbol", &commodity_t::symbol) + .def("set_symbol", &commodity_t::set_symbol) .def_readwrite("name", &commodity_t::name) .def_readwrite("note", &commodity_t::name) .def_readwrite("precision", &commodity_t::precision) @@ -1137,7 +1136,6 @@ void export_amount() .def("find_commodity", &commodity_t::find_commodity, return_value_policy()) - .def("check_symbol", &commodity_t::check_symbol) .def("add_price", &commodity_t::add_price) .def("remove_price", &commodity_t::remove_price) .def("set_conversion", &commodity_t::set_conversion) -- cgit v1.2.3