summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-03 10:42:26 -0400
committerPietro Gagliardi <[email protected]>2014-06-03 10:42:26 -0400
commitc5df1b1afc6980d71de17715868ee2c54aa5cf32 (patch)
treea8167d8657a8c115cd60efd971071edc890858dc
parent25d8aeb99386e7c1bf92f43f4bff270b34cd9f8b (diff)
Removed a stray function from common_windows.go that both was not used and went against what we're trying to do with strings in Windows.
-rw-r--r--common_windows.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/common_windows.go b/common_windows.go
index f2440f1..f3536dc 100644
--- a/common_windows.go
+++ b/common_windows.go
@@ -35,10 +35,6 @@ func (w _WPARAM) HIWORD() uint16 {
return uint16((w >> 16) & 0xFFFF)
}
-func _LPARAMFromString(str string) _LPARAM {
- return _LPARAM(unsafe.Pointer(syscall.StringToUTF16Ptr(str)))
-}
-
func (l _LPARAM) X() int32 {
// according to windowsx.h
loword := uint16(l & 0xFFFF)
@@ -72,7 +68,7 @@ func negConst(c int) uintptr {
}
// the next two are convenience wrappers
-// the intention is not to say utf16ToArg(toUTF16(s)) - even though it appears to work fine, that's just because the garbage collector is slow; if we store this globally then things will break
+// the intention is not to say utf16ToArg(toUTF16(s)) - even though it appears to work fine, that's just because the garbage collector scheduling makes it run long after we're finished; if we store these uintptrs globally instead, then things will break
// instead, call them separately - s := toUTF16(str); winapifunc.Call(utf16ToArg(s))
func toUTF16(s string) *uint16 {