pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:5372:    //! Methods define so that version objects    //! can be compared and ordered.    protected int `<(mixed v) { return objectp(v) && CMP(v) < 0; }    protected int `>(mixed v) { return objectp(v) && CMP(v) > 0; }    protected int `==(mixed v) { return objectp(v) && CMP(v)== 0; }    protected int __hash() { return major * 4711 + minor ; }       protected string _sprintf(int t) {    switch(t) {    case 's': return sprintf("%d.%d",major,minor); -  case 'O': return sprintf("%O(%s)", this_program, this); +  case 'O': return sprintf("%O(%s)", this_program, _sprintf('s'));    }    }       //! The version object can be casted into a string.    protected mixed cast(string type)    {    if( type=="string" )    return sprintf("%d.%d",major,minor);    return UNDEFINED;    }