Skip to content

Commit 206a65c

Browse files
[release-branch.go1.21] runtime: fix Pinner.Pin documention
Fixes golang#63768
1 parent 00f974e commit 206a65c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/runtime/pinner.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ type Pinner struct {
2525
// objects, these objects must be pinned separately if they are going to be
2626
// accessed from C code.
2727
//
28-
// The argument must be a pointer of any type or an
29-
// unsafe.Pointer. It must be the result of calling new,
30-
// taking the address of a composite literal, or taking the address of a
31-
// local variable. If one of these conditions is not met, Pin will panic.
28+
// The argument must be a pointer of any type or an unsafe.Pointer.
29+
// It must be a go pointer and cannot point to memory allocated by arena.
3230
func (p *Pinner) Pin(pointer any) {
3331
if p.pinner == nil {
3432
// Check the pinner cache first.

0 commit comments

Comments
 (0)