mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link/internal/ld: move ld.Cpos to coutbuf.Offset
This change moves the ld.Cpos function to a method on coutbuf. This is part of a larger change that makes ld.outbuf look more like a bio.Buf in an effort to eventually replace the former with the latter. Change-Id: I506f7131935a2aa903fa302a0fab0c5be50220fd Reviewed-on: https://go-review.googlesource.com/27578 Run-TryBot: Dave Cheney <dave@cheney.net> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
61d5daea0a
commit
5f94ff4c87
5 changed files with 34 additions and 35 deletions
|
|
@ -229,6 +229,10 @@ func (w *outBuf) WriteString(s string) (n int, err error) {
|
|||
return n, err
|
||||
}
|
||||
|
||||
func (w *outBuf) Offset() int64 {
|
||||
return w.off
|
||||
}
|
||||
|
||||
var coutbuf outBuf
|
||||
|
||||
const pkgname = "__.PKGDEF"
|
||||
|
|
@ -1771,10 +1775,6 @@ func Cflush() {
|
|||
}
|
||||
}
|
||||
|
||||
func Cpos() int64 {
|
||||
return coutbuf.off
|
||||
}
|
||||
|
||||
func Cseek(p int64) {
|
||||
if p == coutbuf.off {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue