summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-07 10:27:21 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:39 -0400
commitd8498372037a4d0c272547ae48046b2182bcd4b1 (patch)
treeea3f228c5b6b20d71456e47a418e383669925d5f /src/pyinterp.cc
parenta71d48881e538630aa1d147d58365da84e6db91f (diff)
downloadfork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.gz
fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.bz2
fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.zip
Major restructuring of the value_t class.
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r--src/pyinterp.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index ec36188f..dc070fd1 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -148,11 +148,11 @@ void python_interpreter_t::functor_t::operator()(value_t& result,
result = static_cast<const value_t&>(extract<value_t>(func.ptr()));
} else {
assert(locals->args.type == value_t::SEQUENCE);
- if (locals->args.to_sequence()->size() > 0) {
+ if (locals->args.as_sequence().size() > 0) {
list arglist;
for (value_t::sequence_t::iterator
- i = locals->args.to_sequence()->begin();
- i != locals->args.to_sequence()->end();
+ i = locals->args.as_sequence().begin();
+ i != locals->args.as_sequence().end();
i++)
arglist.append(*i);
@@ -167,7 +167,7 @@ void python_interpreter_t::functor_t::operator()(value_t& result,
throw_(xml::xpath_t::calc_error,
"While calling Python function '" << name() << "'");
} else {
- assert(0);
+ assert(false);
}
} else {
result = call<value_t>(func.ptr());
@@ -186,10 +186,10 @@ void python_interpreter_t::lambda_t::operator()(value_t& result,
{
try {
assert(locals->args.type == value_t::SEQUENCE);
- assert(locals->args.to_sequence()->size() == 1);
+ assert(locals->args.as_sequence().size() == 1);
value_t item = locals->args[0];
assert(item.type == value_t::POINTER);
- result = call<value_t>(func.ptr(), item.to_xml_node());
+ result = call<value_t>(func.ptr(), item.as_xml_node());
}
catch (const error_already_set&) {
PyErr_Print();