pike.git / lib / modules / Val.pmod

version» Context lines:

pike.git/lib/modules/Val.pmod:37:    inherit Boolean;       constant is_val_true = 1;    //! Nonzero recognition constant.       string encode_json() {return "true";}       // The following shouldn't be necessary if there's only one    // instance, but that might not always be the case.    protected int __hash() -  {return 34123;} +  { +  return 34123; +  }    protected int `== (mixed other) -  {return objectp (other) && [int]([object]other)->is_val_true;} +  { +  return objectp (other) && [int]([object]other)->is_val_true; +  }       protected mixed cast (string type)    {    switch (type) {    case "int": return 1;    case "string": return "1";    default: error ("Cannot cast %O to %s.\n", this, type);    }    }