summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-05 04:24:15 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-05 04:24:15 -0500
commit15555d497f56e4b4d39e9a14f74b2c82cce52b90 (patch)
tree1e6c661379f02fdc52ef107fd500438ab69f3e60 /src/xact.cc
parent94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f (diff)
parent060fc0e00bacb96d1d16163779d98c45c3999014 (diff)
downloadfork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.tar.gz
fork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.tar.bz2
fork-ledger-15555d497f56e4b4d39e9a14f74b2c82cce52b90.zip
Merge branch 'next'
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 3291c5be..9e5f504e 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -76,6 +76,13 @@ bool xact_base_t::remove_post(post_t * post)
return true;
}
+void xact_base_t::clear_xdata()
+{
+ foreach (post_t * post, posts)
+ if (! post->has_flags(ITEM_TEMP))
+ post->clear_xdata();
+}
+
bool xact_base_t::finalize()
{
// Scan through and compute the total balance for the xact. This is used
@@ -422,8 +429,12 @@ namespace {
}
}
-expr_t::ptr_op_t xact_t::lookup(const string& name)
+expr_t::ptr_op_t xact_t::lookup(const symbol_t::kind_t kind,
+ const string& name)
{
+ if (kind != symbol_t::FUNCTION)
+ return item_t::lookup(kind, name);
+
switch (name[0]) {
case 'c':
if (name == "code")
@@ -448,7 +459,7 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
break;
}
- return item_t::lookup(name);
+ return item_t::lookup(kind, name);
}
bool xact_t::valid() const