Skip to content

Commit

Permalink
[release-branch.go1.21] runtime: fix Pinner.Pin documention
Browse files Browse the repository at this point in the history
  • Loading branch information
qiulaidongfeng committed Jan 26, 2024
1 parent 00f974e commit 206a65c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/runtime/pinner.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ type Pinner struct {
// objects, these objects must be pinned separately if they are going to be
// accessed from C code.
//
// The argument must be a pointer of any type or an
// unsafe.Pointer. It must be the result of calling new,
// taking the address of a composite literal, or taking the address of a
// local variable. If one of these conditions is not met, Pin will panic.
// The argument must be a pointer of any type or an unsafe.Pointer.
// It must be a go pointer and cannot point to memory allocated by arena.
func (p *Pinner) Pin(pointer any) {
if p.pinner == nil {
// Check the pinner cache first.
Expand Down

0 comments on commit 206a65c

Please sign in to comment.