Skip to content

Commit

Permalink
further comment clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhw committed Sep 13, 2023
1 parent cab3242 commit d72ee02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/cgocall.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,9 @@ const cgoResultFail = "cgo result is unpinned Go pointer or points to unpinned G
// cgoCheckArg is the real work of cgoCheckPointer. The argument p
// is either a pointer to the value (of type t), or the value itself,
// depending on indir. The top parameter is whether we are at the top
// level, where Go pointers are allowed. Go pointers to pinned objects are
// always allowed.
// level, where Go pointers are allowed. Go pointers to pinned objects that
// don't reference other unpinned pointers (enforced by cgoCheckUnknownPointer)
// are always allowed.
func cgoCheckArg(t *_type, p unsafe.Pointer, indir, top bool, msg string) {
if t.PtrBytes == 0 || p == nil {
// If the type has no pointers there is nothing to do.
Expand Down

0 comments on commit d72ee02

Please sign in to comment.