Diff for /parser3/src/classes/void.C between versions 1.38 and 1.40

version 1.38, 2007/04/23 10:30:10 version 1.40, 2008/07/18 08:24:35
Line 44  static void _length(Request& r, MethodPa Line 44  static void _length(Request& r, MethodPa
 static void _pos(Request& r, MethodParams& params) {  static void _pos(Request& r, MethodParams& params) {
         // just checking for consistency          // just checking for consistency
         params.as_no_junction(0, "substr must not be code");          params.as_no_junction(0, "substr must not be code");
           if(params.count()>1){
                   ssize_t offset=params.as_int(1, "n must be int", r);
                   if(offset<0)
                           throw Exception(PARSER_RUNTIME,
                                   0, 
                                   "n(%d) must be >=0", offset);
           }
         // never found          // never found
         r.write_no_lang(*new VInt(-1));          r.write_no_lang(*new VInt(-1));
 }  }
Line 124  static void _sql(Request& r, MethodParam Line 131  static void _sql(Request& r, MethodParam
         r.connection()->query(          r.connection()->query(
                 statement_cstr,                   statement_cstr, 
                 placeholders_count, placeholders,                  placeholders_count, placeholders,
                 0, 0,                  0, SQL_NO_LIMIT,
                 handlers,                  handlers,
                 statement_string);                  statement_string);
   
Line 167  MVoid::MVoid(): Methoded("void") { Line 174  MVoid::MVoid(): Methoded("void") {
         add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);          add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);
   
         // ^void.pos[substr]          // ^void.pos[substr]
         add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 1);          add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 2);
   
         // ^void.int[]          // ^void.int[]
         // ^void.int(default)          // ^void.int(default)

Removed from v.1.38  
changed lines
  Added in v.1.40


E-mail: