summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/py_commodity.cc3
-rw-r--r--src/amount.cc2
-rw-r--r--src/commodity.h15
3 files changed, 11 insertions, 9 deletions
diff --git a/python/py_commodity.cc b/python/py_commodity.cc
index 3cf7d30c..928280d5 100644
--- a/python/py_commodity.cc
+++ b/python/py_commodity.cc
@@ -48,7 +48,8 @@ void export_commodity()
scope().attr("COMMODITY_STYLE_EUROPEAN") = COMMODITY_STYLE_EUROPEAN;
scope().attr("COMMODITY_STYLE_THOUSANDS") = COMMODITY_STYLE_THOUSANDS;
scope().attr("COMMODITY_STYLE_NOMARKET") = COMMODITY_STYLE_NOMARKET;
- scope().attr("COMMODITY_STYLE_BUILTIN") = COMMODITY_STYLE_BUILTIN;
+ scope().attr("COMMODITY_BUILTIN") = COMMODITY_BUILTIN;
+ scope().attr("COMMODITY_WALKED") = COMMODITY_WALKED;
class_< commodity_t, bases<>,
commodity_t, boost::noncopyable > ("commodity", no_init)
diff --git a/src/amount.cc b/src/amount.cc
index b03f4490..fd1fc023 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -130,7 +130,7 @@ void amount_t::initialize()
// Add time commodity conversions, so that timelog's may be parsed
// in terms of seconds, but reported as minutes or hours.
if (commodity_t * commodity = current_pool->create("s")) {
- commodity->add_flags(COMMODITY_STYLE_NOMARKET | COMMODITY_STYLE_BUILTIN);
+ commodity->add_flags(COMMODITY_BUILTIN | COMMODITY_STYLE_NOMARKET);
parse_conversion("1.0m", "60s");
parse_conversion("1.0h", "60m");
diff --git a/src/commodity.h b/src/commodity.h
index 6c9a7586..204dec8d 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -127,13 +127,14 @@ public:
history(const std::vector<commodity_t *>& commodities);
};
-#define COMMODITY_STYLE_DEFAULTS 0x00
-#define COMMODITY_STYLE_SUFFIXED 0x01
-#define COMMODITY_STYLE_SEPARATED 0x02
-#define COMMODITY_STYLE_EUROPEAN 0x04
-#define COMMODITY_STYLE_THOUSANDS 0x08
-#define COMMODITY_STYLE_NOMARKET 0x10
-#define COMMODITY_STYLE_BUILTIN 0x20
+#define COMMODITY_STYLE_DEFAULTS 0x00
+#define COMMODITY_STYLE_SUFFIXED 0x01
+#define COMMODITY_STYLE_SEPARATED 0x02
+#define COMMODITY_STYLE_EUROPEAN 0x04
+#define COMMODITY_STYLE_THOUSANDS 0x08
+#define COMMODITY_STYLE_NOMARKET 0x10
+#define COMMODITY_BUILTIN 0x20
+#define COMMODITY_WALKED 0x40
string symbol;
amount_t::precision_t precision;