--- parser3/src/classes/Attic/root.C 2001/03/13 13:43:28 1.38 +++ parser3/src/classes/Attic/root.C 2001/03/13 17:17:25 1.40 @@ -3,7 +3,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: root.C,v 1.38 2001/03/13 13:43:28 paf Exp $ + $Id: root.C,v 1.40 2001/03/13 17:17:25 paf Exp $ */ #include @@ -43,7 +43,7 @@ static void _untaint(Request& r, const S String::Untaint_lang lang=static_cast( untaint_lang_name2enum->get_int(lang_name)); if(!lang) - R_THROW(0, 0, + RTHROW(0, 0, &lang_name, "invalid untaint language"); @@ -114,7 +114,7 @@ static void _while(Request& r, const Str int endless_loop_count=0; while(true) { if(++endless_loop_count>=1973) // endless loop? - R_THROW(0, 0, + RTHROW(0, 0, &method_name, "endless loop detected"); @@ -159,7 +159,7 @@ static void _for(Request& r, const Strin int endless_loop_count=0; for(int i=from; i<=to; i++) { if(++endless_loop_count>=2001) // endless loop? - R_THROW(0, 0, + RTHROW(0, 0, &method_name, "endless loop detected"); vint->set_int(i); @@ -195,7 +195,7 @@ static void _eval(Request& r, const Stri string->APPEND_CONST(format(pool, result->get_double(), fmt.as_string().cstr())); result=new(pool) VString(*string); } - r.wcontext->write(*result, String::Untaint_lang::NO /*always object, not string*/); + r.write_no_lang(*result); } @@ -215,7 +215,7 @@ static void double_one_op( method_name, "parameter must be expression"); Value& result=*new(pool) VDouble(pool, (*func)(r.process(param).get_double())); - r.wcontext->write(result, String::Untaint_lang::NO /*always object, not string*/); + r.write_no_lang(result); } static void _round(Request& r, const String& method_name, Array *params) { @@ -238,6 +238,8 @@ static void _sign(Request& r, const Stri double_one_op(r, method_name, params, &sign); } +// initialize + void initialize_root_class(Pool& pool, VStateless_class& vclass) { // ^if(condition){code-when-true} // ^if(condition){code-when-true}{code-when-false}