pike.git / lib / modules / Standards.pmod / UUID.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/UUID.pmod:1:   #pike __REAL_VERSION__      //!   //! Support for Universal Unique Identifiers (UUID) and   //! Globally Unique Identifiers (GUID).   //!   //! @seealso - //! RFC4122: A Universally Unique IDentifier (UUID) URN Namespace - //! ITU-T X.667: Generation and registration of Universally Unique - //! Identifiers (UUIDs) and their use as ASN.1 object - //! identifier components - //! + //! @dl + //! @item @rfc{4122@} + //! A Universally Unique IDentifier (UUID) URN Namespace. + //! @item ITU-T X.667 + //! Generation and registration of Universally Unique + //! Identifiers (UUIDs) and their use as ASN.1 object + //! identifier components. + //! @enddl      //   // 2004-10-01 Henrik Grubbström   // 2004-10-04 Martin Nilsson      // Specifications:   //   // RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace   // CDE 1.1: Remote Procedure Call: Universal Unique Identifier (Open Group)   // X.667: Generation and registration of Universally Unique Identifiers
pike.git/lib/modules/Standards.pmod/UUID.pmod:224:    for (var = 0; clk_seq & var_mask; var++, var_mask>>=1)    ;    clk_seq &= var_mask - 1;    break;    default:    error("Illegal UUID.\n");    }    validate();    }    -  mixed cast(string to) { +  protected mixed cast(string to) {    switch(to) {    case "string": return str();    case "mapping": return ([    "time_low" : time_low(),    "time_mid" : time_mid(),    "time_hi_and_version" : time_hi_and_version(),    ]);    } -  +  return UNDEFINED;    }      }      // Internal clock sequence class. Only works for variant 4, but all others are   // reserved, so it shouldn't be a problem in practice.   protected class ClkSeq   {    int clk_seq = random(1<<14);    int last_time;