pike.git / lib / modules / Val.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Val.pmod/module.pmod:271:    int nsecs;       array(int) _encode() {    return ({nsecs});    }       void _decode(array(int) x) {    nsecs = x[0];    }    +  protected int __hash() { +  return nsecs; +  } +     //! @param sec    //! Seconds since epoch.    //! @param nsec    //! Nanoseconds since epoch.    variant protected void create(void|mapping(string:int) tm) {    }    variant protected void create(this_program copy) {    nsecs = [int]copy->nsecs;    }    variant protected void create(int|float sec, void|int nsec) {
pike.git/lib/modules/Val.pmod/module.pmod:837:    int days;       array(int) _encode() {    return ({days});    }       void _decode(array(int) x) {    days = x[0];    }    +  protected int __hash() { +  return days; +  } +     //!    variant protected void create(int year, int month, int day) {    create((["year":year - 1900, "mon":month - 1, "mday":day]));    }    variant protected void create(this_program copy) {    days = [int]copy->days;    }    variant protected void create(Timestamp copy) {    days = copy->nsecs / (24 * 3600 * NANOSECONDS) - (copy->nsecs < 0);    }