summaryrefslogtreecommitdiff
path: root/src/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-11 18:29:21 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-11 18:29:21 -0500
commitc22b8457eff27f5227fdf452e036b33e41e229c2 (patch)
treee7f148c117d852f323560966d15bd3f98b7bddcd /src/journal.cc
parent31f85cc8039aa255f04fdccaa6bd9f54f0b65a99 (diff)
downloadfork-ledger-c22b8457eff27f5227fdf452e036b33e41e229c2.tar.gz
fork-ledger-c22b8457eff27f5227fdf452e036b33e41e229c2.tar.bz2
fork-ledger-c22b8457eff27f5227fdf452e036b33e41e229c2.zip
Did away with the "finalizer" abstraction
This was from an earlier time, when it was intended to be used by Python. But it's not needed anymore.
Diffstat (limited to 'src/journal.cc')
-rw-r--r--src/journal.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/journal.cc b/src/journal.cc
index b7ad9a23..c764dbce 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -126,16 +126,23 @@ bool journal_t::add_xact(xact_t * xact)
{
xact->journal = this;
- if (! xact->finalize() || ! xact_finalize_hooks.run_hooks(*xact)) {
+ if (! xact->finalize()) {
xact->journal = NULL;
return false;
}
+ extend_xact(xact);
xacts.push_back(xact);
return true;
}
+void journal_t::extend_xact(xact_base_t * xact)
+{
+ foreach (auto_xact_t * auto_xact, auto_xacts)
+ auto_xact->extend_xact(*xact);
+}
+
bool journal_t::remove_xact(xact_t * xact)
{
bool found = false;