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... --- comctl_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'comctl_windows.go') diff --git a/comctl_windows.go b/comctl_windows.go index ea26704..ffef7c7 100644 --- a/comctl_windows.go +++ b/comctl_windows.go @@ -50,8 +50,8 @@ References: - http://support.microsoft.com/kb/830033 */ func forceCommonControls6() (err error) { - var ( - // from winbase.h; var because Go won't let me convert this constant + const ( + // from winbase.h _INVALID_HANDLE_VALUE = -1 ) @@ -85,7 +85,7 @@ func forceCommonControls6() (err error) { actctx.lpSource = syscall.StringToUTF16Ptr(filename) r1, _, err := _createActCtx.Call(uintptr(unsafe.Pointer(&actctx))) - if r1 == uintptr(_INVALID_HANDLE_VALUE) { // failure + if r1 == negConst(_INVALID_HANDLE_VALUE) { // failure return fmt.Errorf("error creating activation context for synthesized manifest file: %v", err) } r1, _, err = _activateActCtx.Call( -- cgit v1.2.3