1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 17:38:45 -05:00
This commit is contained in:
v2ray 2016-05-23 20:16:31 +02:00
parent ac58eed310
commit 28cf3aa0c7

View File

@ -46,6 +46,26 @@ func (this IntLiteral) Bytes() []byte {
}
}
type Uint32Literal uint32
func (this Uint32Literal) String() string {
return strconv.FormatUint(uint64(this.Value()), 10)
}
func (this Uint32Literal) Value() uint32 {
return uint32(this)
}
func (this Uint32Literal) Bytes() []byte {
value := this.Value()
return []byte{
byte(value >> 24),
byte(value >> 16),
byte(value >> 8),
byte(value),
}
}
type Int64Literal int64
func (this Int64Literal) String() string {