func (p pointer) offset(f field) pointer {
	return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
}
offset converts from a pointer to a structure to a pointer to
one of its fields.
package proto
import (
	"reflect"
	"sync"
)
const unsafeAllowed = false
type field []int
func toField(f *reflect.StructField) field {
	return f.Index
}
var invalidField = field(nil)
var zeroField = field([]int{})
func (f field) IsValid() bool { return f != nil }
type pointer struct {
	v reflect.Value
}
func toPointer(i *Message) pointer {
	return pointer{v: reflect.ValueOf(*i)}
}
func toAddrPointer(i *interface{}, isptr bool) pointer {
	v := reflect.ValueOf(*i)
	u := reflect.New(v.Type())
	u.Elem().Set(v)
	return pointer{v: u}
}
func valToPointer(v reflect.Value) pointer {
	return pointer{v: v}
}