mirror of
https://github.com/golang/go
synced 2024-11-19 17:04:41 -07:00
runtime.Callers: make documentation match code
It is a bug that Caller and Callers disagree about the offset of the skip parameter. Document the bug. R=rsc, dsymonds, r, iant CC=golang-dev https://golang.org/cl/5976064
This commit is contained in:
parent
0669261af1
commit
6849c4db0c
@ -20,7 +20,8 @@ func Goexit()
|
|||||||
|
|
||||||
// Caller reports file and line number information about function invocations on
|
// Caller reports file and line number information about function invocations on
|
||||||
// the calling goroutine's stack. The argument skip is the number of stack frames
|
// the calling goroutine's stack. The argument skip is the number of stack frames
|
||||||
// to ascend, with 0 identifying the caller of Caller. The return values report the
|
// to ascend, with 1 identifying the caller of Caller. (For historical reasons the
|
||||||
|
// meaning of skip differs between Caller and Callers.) The return values report the
|
||||||
// program counter, file name, and line number within the file of the corresponding
|
// program counter, file name, and line number within the file of the corresponding
|
||||||
// call. The boolean ok is false if it was not possible to recover the information.
|
// call. The boolean ok is false if it was not possible to recover the information.
|
||||||
func Caller(skip int) (pc uintptr, file string, line int, ok bool)
|
func Caller(skip int) (pc uintptr, file string, line int, ok bool)
|
||||||
|
Loading…
Reference in New Issue
Block a user