runtime/cgo: document Handle better #45427
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
CL 295369 (issue #37033) added the new type
runtime/cgo.Handle
. The documentation currently says:But it doesn't mention what it means by an “unsafe” value. I assume that what it means is a reference to the “Passing pointers” section of the
cgo
documentation, but the example code that the package currently provides simply passes a [pointer to an] integer between Go and C.I think that the code should be replaced with something better documented and closer to real-world scenarios, and also that perhaps direct links to the
cgo
documentation about which values are typically unsafe should be added.The text was updated successfully, but these errors were encountered: