--- parser3/src/classes/op.C 2002/03/04 10:03:35 1.72 +++ parser3/src/classes/op.C 2002/03/04 14:51:10 1.73 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: op.C,v 1.72 2002/03/04 10:03:35 paf Exp $ + $Id: op.C,v 1.73 2002/03/04 14:51:10 paf Exp $ */ #include "classes.h" @@ -112,7 +112,10 @@ static void _process(Request& r, const S #endif VStateless_class& self_class=*r.self->get_class(); + const Method *main_method; { + // temporary remove language change + Temp_lang temp_lang(r, String::UL_PASS_APPENDED); // temporary zero @main so to maybe-replace it in processed code Temp_method temp_method_main(self_class, *main_method_name, 0); // temporary zero @auto so it wouldn't be auto-called in Request::use_buf @@ -129,11 +132,14 @@ static void _process(Request& r, const S place, &self_class); - // maybe-execute @main[] - if(const Method *method=self_class.get_method(*main_method_name)) { - // execute! - r.execute(*method->parser_code); - } + // main_method + main_method=self_class.get_method(*main_method_name); + } + // after restoring current-request-lang + // maybe-execute @main[] + if(main_method) { + // execute! + r.execute(*main_method->parser_code); } }