From cdac126d805f029858e587d63364b71ec38cf6a7 Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Wed, 9 Dec 2020 19:12:33 +0900 Subject: [PATCH] Change uintptrSize to constant --- encode_opcode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encode_opcode.go b/encode_opcode.go index e4ca528..a7c93a4 100644 --- a/encode_opcode.go +++ b/encode_opcode.go @@ -6,7 +6,7 @@ import ( "unsafe" ) -var uintptrSize = unsafe.Sizeof(uintptr(0)) +const uintptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const type opcode struct { op opType // operation type