Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Unified Diff: src/pkg/io/io.go

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/internal/syscall/getrandom_linux.go ('k') | src/pkg/math/abs_386.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/io/io.go
===================================================================
--- a/src/pkg/io/io.go
+++ b/src/pkg/io/io.go
@@ -63,7 +63,7 @@
//
// Implementations of Read are discouraged from returning a
// zero byte count with a nil error, and callers should treat
-// that situation as a no-op.
+// that situation as a no-op. Implementations must not retain p.
type Reader interface {
Read(p []byte) (n int, err error)
}
@@ -75,6 +75,8 @@
// and any error encountered that caused the write to stop early.
// Write must return a non-nil error if it returns n < len(p).
// Write must not modify the slice data, even temporarily.
+//
+// Implementations must not retain p.
type Writer interface {
Write(p []byte) (n int, err error)
}
@@ -192,6 +194,8 @@
//
// Clients of ReadAt can execute parallel ReadAt calls on the
// same input source.
+//
+// Implementations must not retain p.
type ReaderAt interface {
ReadAt(p []byte, off int64) (n int, err error)
}
@@ -209,6 +213,8 @@
//
// Clients of WriteAt can execute parallel WriteAt calls on the same
// destination if the ranges do not overlap.
+//
+// Implementations must not retain p.
type WriterAt interface {
WriteAt(p []byte, off int64) (n int, err error)
}
« no previous file with comments | « src/pkg/internal/syscall/getrandom_linux.go ('k') | src/pkg/math/abs_386.s » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b