Emit GetRootAs methods for all types in Go and Python

This commit is contained in:
Dan Ring
2015-11-21 19:49:33 -05:00
parent 5a401aef57
commit 1f8e3c13e6
7 changed files with 35 additions and 10 deletions

View File

@@ -9,6 +9,13 @@ type Stat struct {
_tab flatbuffers.Table
}
func GetRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &Stat{}
x.Init(buf, n + offset)
return x
}
func (rcv *Stat) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i