runtime/cgo: support Handle even when CGO_ENABLED=0 #64663
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go1.21.0
What operating system and processor architecture are you using (
go env
)?What did you do?
Run the program
on Windows (
GOOS=windows
).What did you expect to see?
No error.
What did you see instead?
This issue may be fixed by forcing
CGO_ENABLED=1
when usingcgo.NewHandle
, but I think that's the short-sighted fix.cgo.Handle
is also useful for storing context when using thesyscall
facility for calling native code.The text was updated successfully, but these errors were encountered: