Remove all string allocations during parsing.

Change the signature for 'string' getters and settings to use byte
slices instead of strings.
This commit is contained in:
rw
2015-04-02 11:56:55 -07:00
parent 0a3a09aaf3
commit f02646e357
5 changed files with 19 additions and 19 deletions

View File

@@ -14,12 +14,12 @@ func (rcv *Stat) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *Stat) Id() string {
func (rcv *Stat) Id() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return rcv._tab.String(o + rcv._tab.Pos)
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return ""
return nil
}
func (rcv *Stat) Val() int64 {