goprotobuf: a little more cleanup
fix typo, delete unused function
R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/5294046
diff --git a/proto/decode.go b/proto/decode.go
index fd3960d..9a64221 100644
--- a/proto/decode.go
+++ b/proto/decode.go
@@ -411,21 +411,14 @@
return err
}
-// Make *pslice have base address base, length 0, and capacity startSize.
-func initSlice(pslice unsafe.Pointer, base uintptr) {
- sp := (*reflect.SliceHeader)(pslice)
- sp.Data = base
- sp.Len = 0
- sp.Cap = startSize
-}
-
// Individual type decoders
// For each,
// u is the decoded value,
// v is a pointer to the field (pointer) in the struct
// Sizes of the pools to allocate inside the Buffer.
-// The goal is modest amortization and allocation on at lest 16-byte boundaries.
+// The goal is modest amortization and allocation
+// on at least 16-byte boundaries.
const (
boolPoolSize = 16
int32PoolSize = 8
@@ -499,7 +492,6 @@
if err != nil {
return err
}
-
v := (*[]byte)(unsafe.Pointer(base + p.offset))
*v = b
return nil