summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/account.cc b/src/account.cc
index 23761049..43b7cd56 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -241,8 +241,12 @@ namespace {
}
}
-expr_t::ptr_op_t account_t::lookup(const string& name)
+expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind,
+ const string& name)
{
+ if (kind != symbol_t::FUNCTION)
+ return NULL;
+
switch (name[0]) {
case 'a':
if (name == "amount")
@@ -378,6 +382,15 @@ account_t::xdata_t::details_t::operator+=(const details_t& other)
return *this;
}
+void account_t::clear_xdata()
+{
+ xdata_ = none;
+
+ foreach (accounts_map::value_type& pair, accounts)
+ if (! pair.second->has_flags(ACCOUNT_TEMP))
+ pair.second->clear_xdata();
+}
+
value_t account_t::amount(const optional<expr_t&>& expr) const
{
if (xdata_ && xdata_->has_flags(ACCOUNT_EXT_VISITED)) {