Modify PDT type identifiers to avoid hash collision.

This commit is contained in:
2022-11-05 20:00:15 +08:00
parent a422f06221
commit c3dc6b9a03

View File

@@ -3,26 +3,26 @@
/// The identifiers of the internal types of PDT.
/// </summary>
public static class PdtInternalType {
internal readonly static int Error = "error".GetHashCode();
internal readonly static int Error = 0x00525245;
/// <summary>
/// Array of a same variable-length type, with a suffix indicating the element count and the element type.
/// </summary>
public readonly static int Array = "array".GetHashCode();
public readonly static int Array = 0x00525241;
/// <summary>
/// IEEE 754 32-bit floating-point number.
/// </summary>
public readonly static int Number = "number".GetHashCode();
public readonly static int Number = 0x004d554e;
/// <summary>
/// A sequence of UTF-16 code units, with a prefix indicating the number of the code units.
/// </summary>
public readonly static int String = "string".GetHashCode();
public readonly static int String = 0x00525453;
/// <summary>
/// A sequence of UTF-16 code units, with a prefix indicating the number of the code units, representing the name of an undefined variable.
/// </summary>
public readonly static int Undefined = "undefined".GetHashCode();
public readonly static int Undefined = 0x00444e55;
/// <summary>
/// Vector of a same constant-length type, with a suffix indicating the element type.
/// </summary>
public readonly static int Vector = "vector".GetHashCode();
public readonly static int Vector = 0x00434556;
}
}