--- parser3/src/classes/string.C 2003/02/04 14:04:46 1.125.2.3 +++ parser3/src/classes/string.C 2003/02/06 15:33:14 1.125.2.6 @@ -5,9 +5,11 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/02/04 14:04:46 $"; +static const char* IDENT_STRING_C="$Date: 2003/02/06 15:33:14 $"; #include "classes.h" +#include "pa_vmethod_frame.h" + #include "pa_request.h" #include "pa_vdouble.h" #include "pa_vint.h" @@ -43,7 +45,7 @@ static void _int(Request& r, StringPtr m try { if(!self_string || self_string->is_empty()) throw Exception("parser.runtime", - &method_name, + method_name, "parameter is empty string, error converting"); converted=self_string->as_int(); } catch(...) { // convert problem @@ -63,7 +65,7 @@ static void _double(Request& r, StringPt try { if(!self_string || self_string->is_empty()) throw Exception("parser.runtime", - &method_name, + method_name, "parameter is empty string, error converting"); converted=self_string->as_double(); } catch(...) { // convert problem @@ -87,8 +89,8 @@ static void _double(Request& r, StringPt String result(pool); result.APPEND_CLEAN(buf, 0, - method_name.origin().file, - method_name.origin().line); + method_name->origin().file, + method_name->origin().line); r.write_no_lang(result); } @@ -310,7 +312,7 @@ static void _match(Request& r, StringPtr bool was_global; bool matched=src.match( - &method_name, + method_name, regexp.as_string(), options, &table, search_action, 0, @@ -331,7 +333,7 @@ static void _match(Request& r, StringPtr String& result=*new(pool) String(pool); VTable vtable(pool); Replace_action_info replace_action_info={ - &r, &method_name, + &r, method_name, &src, &result, &vtable, &replacement_code @@ -340,7 +342,7 @@ static void _match(Request& r, StringPtr *replacement_code.get_junction()->method_frame, *match_var_name, &vtable); src.match( - &method_name, + method_name, r.process_to_string(regexp), options, &table, replace_action, &replace_action_info); @@ -435,12 +437,12 @@ const String* sql_result_string(Request& ;//default_junction->change_context(statement.get_junction()); else throw Exception("parser.runtime", - &method_name, + method_name, "default option must be code"); } } else throw Exception("parser.runtime", - &method_name, + method_name, "options must be hash"); } else options=0; @@ -474,7 +476,7 @@ static void _sql(Request& r, StringPtr m string=new(pool) String(pool); } else throw Exception("parser.runtime", - &method_name, + method_name, "produced no result, but no default option specified"); } @@ -488,7 +490,7 @@ static void _replace(Request& r, StringP Table *table=params.as_no_junction(0, "parameter must not be code").get_table(); if(!table) throw Exception("parser.runtime", - &method_name, + method_name, "parameter must be table"); Dictionary dict(*table); @@ -496,7 +498,7 @@ static void _replace(Request& r, StringP } static void _save(Request& r, StringPtr method_name, MethodParams& params) { - const String& file_name=params.as_string(params.count()-1, + StringPtr file_name=params.as_string(params.count()-1, "file name must be string"); const String& src=static_cast(r.get_self())->string();