From d8498372037a4d0c272547ae48046b2182bcd4b1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 7 May 2007 10:27:21 +0000 Subject: Major restructuring of the value_t class. --- src/pyinterp.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pyinterp.cc') 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(extract(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(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(func.ptr(), item.to_xml_node()); + result = call(func.ptr(), item.as_xml_node()); } catch (const error_already_set&) { PyErr_Print(); -- cgit v1.2.3