cmd/cgo: please provide a way to set errno from a callback #23890
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
I'm interfacing with a C library that expects callbacks to return -1 with
errno
set upon error. As far as I can tell, the only way to set errno in a go function is to call back into C:This is in contrast with retrieving
errno
in Go using multiple return values, which I find elegant and Go-like. Please provide a similarly tasteful way to return from Go to C while settingerrno
.The text was updated successfully, but these errors were encountered: