Commit ca8dd033 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/cgo: correct comment on Package.rewriteCall

Account for changes in https://golang.org/cl/31233.

Change-Id: I3311c6850a3c714d18209fdff500dd817e9dfcb2
Reviewed-on: https://go-review.googlesource.com/31594Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent abcf8457
......@@ -615,8 +615,10 @@ func (p *Package) rewriteCalls(f *File) bool {
return needsUnsafe
}
// rewriteCall rewrites one call to add pointer checks. We replace
// each pointer argument x with _cgoCheckPointer(x).(T).
// rewriteCall rewrites one call to add pointer checks.
// If any pointer checks are required, we rewrite the call into a
// function literal that calls _cgoCheckPointer for each pointer
// argument and then calls the original function.
// This returns whether the package needs to import unsafe as _cgo_unsafe.
func (p *Package) rewriteCall(f *File, call *Call, name *Name) bool {
// Avoid a crash if the number of arguments is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment