summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-10 05:07:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-10 05:07:50 -0400
commite414123ecb472d1f86a2f1cfdbd2732144c20f0d (patch)
treecafc81314d337786ea0d8461a96110ee5b1d6fe2 /amount.cc
parent6261da4660a6602345c19d5a948124991bda86dc (diff)
downloadfork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.tar.gz
fork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.tar.bz2
fork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.zip
change commodity->symbol to const, and added set_symbol
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc6
1 files changed, 2 insertions, 4 deletions
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<std::string, optional<unsigned int, unsigned int> >())
- // 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<reference_existing_object>())
- .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)