--- parser3/src/classes/hash.C 2016/07/20 13:57:04 1.130 +++ parser3/src/classes/hash.C 2016/10/06 19:41:36 1.134 @@ -17,7 +17,7 @@ #include "pa_vbool.h" #include "pa_vmethod_frame.h" -volatile const char * IDENT_HASH_C="$Id: hash.C,v 1.130 2016/07/20 13:57:04 moko Exp $"; +volatile const char * IDENT_HASH_C="$Id: hash.C,v 1.134 2016/10/06 19:41:36 moko Exp $"; // class @@ -309,19 +309,19 @@ static void _sql(Request& r, MethodParam } if(Value* vlimit=options->get(sql_limit_name)) { valid_options++; - limit=(ulong)r.process_to_value(*vlimit).as_double(); + limit=(ulong)r.process(*vlimit).as_double(); } if(Value* voffset=options->get(sql_offset_name)) { valid_options++; - offset=(ulong)r.process_to_value(*voffset).as_double(); + offset=(ulong)r.process(*voffset).as_double(); } if(Value* vdistinct=options->get(sql_distinct_name)) { valid_options++; - distinct=r.process_to_value(*vdistinct).as_bool(); + distinct=r.process(*vdistinct).as_bool(); } if(Value* vvalue_type=options->get(sql_value_type_name)) { valid_options++; - value_type=get_value_type(r.process_to_value(*vvalue_type)); + value_type=get_value_type(r.process(*vvalue_type)); } if(valid_options!=options->count()) throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION); @@ -400,7 +400,7 @@ static void _foreach(Request& r, MethodP const String* key_var_name=¶ms.as_string(0, "key-var name must be string"); const String* value_var_name=¶ms.as_string(1, "value-var name must be string"); Value* body_code=¶ms.as_junction(2, "body must be code"); - Value* delim_maybe_code=params.count()>3?params.get(3):0; + Value* delim_maybe_code=params.count()>3?¶ms[3]:0; Value& caller=*r.get_method_frame()->caller(); if(key_var_name->is_empty()) key_var_name=0; @@ -419,7 +419,7 @@ static void _foreach(Request& r, MethodP if(value_var_name) r.put_element(caller, *value_var_name, i.value()); - StringOrValue sv_processed=r.process(*body_code); + Value& sv_processed=r.process(*body_code); Request::Skip lskip=r.get_skip(); r.set_skip(Request::SKIP_NOTHING); const String* s_processed=sv_processed.get_string(); @@ -517,7 +517,7 @@ static void _sort(Request& r, MethodPara if(value_var) r.put_element(*context, *value_var, i.value()); - Value& value=r.process_to_value(key_maker); + Value& value=r.process(key_maker); if(pos==0) // determining key values type by first one key_values_are_strings=value.is_string(); @@ -532,7 +532,7 @@ static void _sort(Request& r, MethodPara if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) for(pos=0; pos 1) { const String& stype=params.as_string(1, "type must be string"); @@ -570,7 +570,7 @@ static void _at(Request& r, MethodParams throw Exception(PARSER_RUNTIME, &stype, "type must be 'key', 'value' or 'hash'"); } - Value& vwhence=*params.get(0); + Value& vwhence=params[0]; if(vwhence.is_string()) { const String& swhence=*vwhence.get_string(); if(swhence == "last") @@ -580,7 +580,7 @@ static void _at(Request& r, MethodParams &swhence, "whence must be 'first', 'last' or expression"); } else { - pos=r.process_to_value(vwhence).as_int(); + pos=r.process(vwhence).as_int(); if(pos < 0) pos+=count; }