summaryrefslogtreecommitdiffhomepage
path: root/tools/go_marshal/marshal
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-20 14:28:31 -0800
committerCopybara-Service <copybara-worker@google.com>2020-02-20 14:29:26 -0800
commitd90d71474f4c82f742140fdf026821709845cece (patch)
tree055a133e58d5fbea0c852c1a8468977f30940dc9 /tools/go_marshal/marshal
parent1bb0195079810773bd4457eecb1e7ac1890ddb74 (diff)
Remove bytes read/written from marshal.Marshallable API.
Users of the API only care about whether the copy in/out succeeds in their entirety, which is already signalled by the returned error. PiperOrigin-RevId: 296297843
Diffstat (limited to 'tools/go_marshal/marshal')
-rw-r--r--tools/go_marshal/marshal/marshal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/go_marshal/marshal/marshal.go b/tools/go_marshal/marshal/marshal.go
index 20353850d..f129788e0 100644
--- a/tools/go_marshal/marshal/marshal.go
+++ b/tools/go_marshal/marshal/marshal.go
@@ -91,12 +91,12 @@ type Marshallable interface {
// marshalled does not escape. The implementation should avoid creating
// extra copies in memory by directly deserializing to the object's
// underlying memory.
- CopyIn(task Task, addr usermem.Addr) (int, error)
+ CopyIn(task Task, addr usermem.Addr) error
// CopyOut serializes a Marshallable type to a task's memory. This may only
// be called from a task goroutine. This is more efficient than calling
// MarshalUnsafe on Marshallable.Packed types, as the type being serialized
// does not escape. The implementation should avoid creating extra copies in
// memory by directly serializing from the object's underlying memory.
- CopyOut(task Task, addr usermem.Addr) (int, error)
+ CopyOut(task Task, addr usermem.Addr) error
}