From 1a755ddee807fe4e1b683f32b21d710dc78600a2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 9 May 2018 13:34:33 -0700 Subject: Added tentative support for luajit (depends on pure-lua LPEG implementation). --- uuid.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uuid.lua') diff --git a/uuid.lua b/uuid.lua index 878727b..563b950 100644 --- a/uuid.lua +++ b/uuid.lua @@ -13,10 +13,10 @@ local function uuid() -- Set the four most significant bits (bits 12 through 15) of the -- time_hi_and_version field to the 4-bit version number from -- Section 4.1.3. - bytes[3] = bit32.bor(bytes[3], 0x4000) + bytes[3] = bytes[3] + 0x4000 -- Set the two most significant bits (bits 6 and 7) of the -- clock_seq_hi_and_reserved to zero and one, respectively. - bytes[4] = bit32.bor(bytes[4], 0xC0) + bytes[4] = bytes[4] + 0xC0 return ("%08x-%04x-%04x-%02x%02x-%6x%6x"):format(unpack(bytes)) end -- cgit v1.2.3