diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:02:14 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:02:14 -0400 |
commit | ea1642b3f969463a49e5a671478c92e4ef129665 (patch) | |
tree | 9eba47b8708123b4e3f539dd9d747f1f85d9d2fe /src/session.cc | |
parent | ad3b30a9641b8e09c38ea76e7011b614152d8faf (diff) | |
download | fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.tar.gz fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.tar.bz2 fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.zip |
Completely reworked argument passing in expressions
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/session.cc b/src/session.cc index b5441766..df6eaf7d 100644 --- a/src/session.cc +++ b/src/session.cc @@ -182,12 +182,11 @@ void session_t::close_journal_files() amount_t::initialize(); } -value_t session_t::fn_account(call_scope_t& scope) +value_t session_t::fn_account(call_scope_t& args) { - interactive_t args(scope, "v"); - if (scope[0].is_string()) + if (args[0].is_string()) return scope_value(journal->find_account(args.get<string>(0), false)); - else if (scope[0].is_mask()) + else if (args[0].is_mask()) return scope_value(journal->find_account_re(args.get<mask_t>(0).str())); else return NULL_VALUE; |