diff options
author | Rob Pike <r@golang.org> | 2012-04-10 09:47:57 +1000 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2012-04-10 09:47:57 +1000 |
commit | 610fc6598ba5c9a541ed68b66df7ccff864fdadc (patch) | |
tree | 3838814676c19545925699057187d86e0dcc01fd | |
parent | 8f72d82b63721c2b2bdbef28ee2e9169a0bce5ab (diff) | |
download | go-610fc6598ba5c9a541ed68b66df7ccff864fdadc.tar.gz go-610fc6598ba5c9a541ed68b66df7ccff864fdadc.zip |
[release-branch.go1] runtime.Callers: make documentation match code
««« backport a7db811befb8
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
»»»
-rw-r--r-- | src/pkg/runtime/extern.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go index 5fbfe547e4..f9c5b8e3dd 100644 --- a/src/pkg/runtime/extern.go +++ b/src/pkg/runtime/extern.go @@ -20,7 +20,8 @@ func Goexit() // 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 -// 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 // 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) |