Diff for /parser3/src/classes/void.C between versions 1.23 and 1.25

version 1.23, 2002/08/20 08:19:00 version 1.25, 2002/09/18 08:52:49
Line 27  public: // Methoded Line 27  public: // Methoded
   
 static void _length(Request& r, const String&, MethodParams *params) {  static void _length(Request& r, const String&, MethodParams *params) {
         Pool& pool=r.pool();          Pool& pool=r.pool();
           // always zero
         r.write_no_lang(*new(pool) VInt(pool, 0));          r.write_no_lang(*new(pool) VInt(pool, 0));
 }  }
   
   static void _pos(Request& r, const String& method_name, MethodParams *params) {
           Pool& pool=r.pool();
   
           Value& substr=params->as_no_junction(0, "substr must not be code");
           // never found
           r.write_assign_lang(*new(pool) VInt(pool, -1));
   }
   
 static void _int(Request& r, const String&, MethodParams *params) {  static void _int(Request& r, const String&, MethodParams *params) {
         Pool& pool=r.pool();          Pool& pool=r.pool();
         VVoid *vvoid=static_cast<VVoid *>(r.self);          VVoid *vvoid=static_cast<VVoid *>(r.get_self());
         r.write_no_lang(*new(pool) VInt(pool,           r.write_no_lang(*new(pool) VInt(pool, 
                 params->size()==0?vvoid->as_int():params->as_int(0, "default must be int", r)));                  params->size()==0?vvoid->as_int():params->as_int(0, "default must be int", r)));
 }  }
   
 static void _double(Request& r, const String&, MethodParams *params) {  static void _double(Request& r, const String&, MethodParams *params) {
         Pool& pool=r.pool();          Pool& pool=r.pool();
         VVoid *vvoid=static_cast<VVoid *>(r.self);          VVoid *vvoid=static_cast<VVoid *>(r.get_self());
         r.write_no_lang(*new(pool) VDouble(pool,           r.write_no_lang(*new(pool) VDouble(pool, 
                 params->size()==0?vvoid->as_double():params->as_double(0, "default must be double", r)));                  params->size()==0?vvoid->as_double():params->as_double(0, "default must be double", r)));
 }  }
Line 87  MVoid::MVoid(Pool& apool) : Methoded(apo Line 96  MVoid::MVoid(Pool& apool) : Methoded(apo
         // ^void.length[]           // ^void.length[] 
         add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);          add_native_method("length", Method::CT_DYNAMIC, _length, 0, 0);
   
           // ^void.pos[substr]
           add_native_method("pos", Method::CT_DYNAMIC, _pos, 1, 1);
   
         // ^void.int[]           // ^void.int[] 
         // ^void.int(default)          // ^void.int(default)
         add_native_method("int", Method::CT_DYNAMIC, _int, 0, 1);          add_native_method("int", Method::CT_DYNAMIC, _int, 0, 1);

Removed from v.1.23  
changed lines
  Added in v.1.25


E-mail: