From eb0188a0999b7a7c1746b06a6c22e147cf3f1ac6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 25 May 2014 11:31:57 -0400 Subject: Changed most instances of var to const in the Windows code. Only one left... --- common_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common_windows.go') diff --git a/common_windows.go b/common_windows.go index 85dce45..f9289cb 100644 --- a/common_windows.go +++ b/common_windows.go @@ -76,6 +76,12 @@ type _RECT struct { bottom int32 } +// Go doesn't allow negative constants to be forced into unsigned types at compile-time; this will do it at runtime. +// TODO make sure sign extension works fine here (check Go's rules and ABI sign extension rules) +func negConst(c int) uintptr { + return uintptr(c) +} + // Predefined cursor resource IDs. const ( _IDC_APPSTARTING = 32650 -- cgit v1.2.3