--- parser3/src/main/execute.C 2002/04/16 08:41:05 1.232 +++ parser3/src/main/execute.C 2002/04/16 14:33:18 1.235 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: execute.C,v 1.232 2002/04/16 08:41:05 paf Exp $ + $Id: execute.C,v 1.235 2002/04/16 14:33:18 paf Exp $ */ #include "pa_opcode.h" @@ -23,7 +23,7 @@ #include "pa_vimage.h" #include "pa_wwrapper.h" -#define DEBUG_EXECUTE +//#define DEBUG_EXECUTE //#define DEBUG_STRING_APPENDS_VS_EXPANDS @@ -937,7 +937,13 @@ const String *Request::execute_method(Va execute(*method.parser_code); // result - const String *result=return_cstr ? &wcontext->as_string() : 0; + const String *result=0; + if(return_cstr) { + if(Value *result_var_value=wcontext->get_element(*result_var_name)) + result=&result_var_value->as_string(); + else + result=&wcontext->as_string(); + } wcontext=static_cast(POP()); rcontext=POP(); @@ -962,7 +968,7 @@ const String& Request::execute_method(VM execute(*method.parser_code); // result - const String& result=wcontext->as_string(); + const String& result=wcontext->result().as_string(); wcontext=static_cast(POP()); rcontext=POP();