summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-17 21:08:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-17 21:08:54 -0400
commit24e64c202ea71ad73a860f16c6ba4b9288768fef (patch)
tree164ad88366e42450ae180d3b184a522a4c3feaaa /src/xact.cc
parent5ec2b74f5689af0966e1d0fd0aaadd61464978c9 (diff)
downloadfork-ledger-24e64c202ea71ad73a860f16c6ba4b9288768fef.tar.gz
fork-ledger-24e64c202ea71ad73a860f16c6ba4b9288768fef.tar.bz2
fork-ledger-24e64c202ea71ad73a860f16c6ba4b9288768fef.zip
Added the 'note' value expression identifier.
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 2357de8e..556a0776 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -126,7 +126,7 @@ namespace {
}
value_t get_note(xact_t& xact) {
- return string_value(xact.note ? *xact.note : ":NOTELESS:");
+ return string_value(xact.note ? *xact.note : empty_string);
}
value_t get_account(call_scope_t& scope)
@@ -212,6 +212,11 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
}
break;
+ case 'n':
+ if (name == "note")
+ return WRAP_FUNCTOR(get_wrapper<&get_note>);
+ break;
+
case 'p':
if (name == "pending")
return WRAP_FUNCTOR(get_wrapper<&get_pending>);