pike.git / lib / modules / ADT.pmod / Interval.pike

version» Context lines:

pike.git/lib/modules/ADT.pmod/Interval.pike:143:   }      void create(mixed a, mixed b) {    if (!objectp(a) || !Program.inherits(object_program(a), Boundary)) {    a = Closed(a);    }    if (!objectp(b) || !Program.inherits(object_program(b), Boundary)) {    b = Closed(b);    }    if (!b->overlaps(a)) error("Trying to create empty interval.\n"); -  this_program::a = a; -  this_program::b = b; +  this::a = a; +  this::b = b;   }      int(0..1) `==(mixed i) {    return objectp(i) && Program.inherits(object_program(i), this_program) && a == i->a && b == i->b;   }      // 0 (..)..[..]   // 1 (..[..)..]   // 2 [..(..)..]   // 3 [..(..]..)
pike.git/lib/modules/ADT.pmod/Interval.pike:239:    return !!(this&x);   }      /* TODO:    * implement or remap the api offered by the timerange thing.    */      mixed beginning() { return start; }   mixed end() { return stop; }    - mixed cast(string type) { -  switch (type) { -  case "array": + protected mixed cast(string type) { +  if( type=="array" )    return ({ start, stop }); -  +  return UNDEFINED;   } - } +