From a1f9dca68cb3597bb76cd57a0504b6cd620cdce8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 16 Oct 2014 14:09:11 -0400 Subject: Storing the *container in the Windows GWLP_USERDATA is no longer needed; strip it. --- newctrl/container_windows.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'newctrl/container_windows.go') diff --git a/newctrl/container_windows.go b/newctrl/container_windows.go index 91aee8f..521b205 100644 --- a/newctrl/container_windows.go +++ b/newctrl/container_windows.go @@ -5,7 +5,6 @@ package ui import ( "fmt" "syscall" - "unsafe" ) // #include "winapi_windows.h" @@ -38,10 +37,10 @@ func makeContainerWindowClass() error { } func newContainer() *container { - c := new(container) - c.controlSingleHWND = newControlSingleHWND(C.newContainer(unsafe.Pointer(c))) // don't set preferredSize(); it should never be called - return c + return &container{ + controlSingleHWND: newControlSingleHWND(C.newContainer()), + } } // TODO merge with controlSingleHWND -- cgit v1.2.3