doc: second return value of syscall.Syscall needs to be documented #29842
Labels
Documentation
NeedsFix
The path to resolution is known, but the work has not been done.
Suggested
Issues that may be good for new contributors looking for work to do.
Milestone
I'm using Go 1.11.2 on 32 bit Windows.
Current documentation of
Syscall*
doesn't give any sense about second return valuer2
. And in most cases, this value seems not needed at all. But Go codebase internally uses it:go/src/runtime/syscall_windows_test.go
Lines 103 to 118 in 5538a9a
And if I understood correctly, the second value is needed only when dealing with APIs that use 64 bit values(e.g. VerSetConditionMask). Since
uintptr
is 32 bit integer and can't hold those APIs' result, the second return valuer2
is used. But there isn't any documentation about return values fromsyscall.Syscall*
that tells which one holds highest 32 bits, etc.Also the arguments for those APIs seems to be merged(see code above) when dealing with 64 bit values. Without knowing that, I met a horrible panic that doesn't tell any meaningful reason. So it'd be good if these behaviors are well documented.
The text was updated successfully, but these errors were encountered: