mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 23:17:27 +00:00
Emit GetRootAs methods for all types in Go and Python
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user