1
0
mirror of https://github.com/golang/go synced 2024-09-24 05:10:13 -06:00

runtime: add missing import "C" in TestLibraryCtrlHandler

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>
This commit is contained in:
Alex Brainman 2021-04-26 17:56:10 +10:00
parent cb34026a95
commit ca8e8317be

View File

@ -1,7 +1,10 @@
//go:build windows
// +build windows
package main
import "C"
//export Dummy
func Dummy() int {
return 42