]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: add missing import "C" in TestLibraryCtrlHandler
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 26 Apr 2021 07:56:10 +0000 (17:56 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 27 Apr 2021 08:36:54 +0000 (08:36 +0000)
CL 211139 added TestLibraryCtrlHandler. But the CL left out import "C"
line in the test file that is supposed to be build with Cgo.

While debugging issue #45638, I discovered that the DLL built during
TestLibraryCtrlHandler does not have Dummy function. Adding import "C"
makes Dummy function appear in DLL function list.

TestLibraryCtrlHandler does not actually calls Dummy function. So I
don't see how this change affects issue #45638, but still let's make
this code correct.

Updates #45638

Change-Id: Ibab8fed29ef2ae446d0815842cf0bd040a5fb943
Reviewed-on: https://go-review.googlesource.com/c/go/+/313350
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/testdata/testwinlibsignal/dummy.go

index 82dfd91c93a2d91864ac7a38cf6a506d2529b175..e610f15d06cb5b995993f45b62b18e60db38624a 100644 (file)
@@ -1,7 +1,10 @@
+//go:build windows
 // +build windows
 
 package main
 
+import "C"
+
 //export Dummy
 func Dummy() int {
        return 42