mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 22:20:56 +00:00
Emit GetRootAs methods for all types in Go and Python
This commit is contained in:
@@ -7,6 +7,13 @@ import flatbuffers
|
||||
class Stat(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
@classmethod
|
||||
def GetRootAsStat(cls, buf, offset):
|
||||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
||||
x = Stat()
|
||||
x.Init(buf, n + offset)
|
||||
return x
|
||||
|
||||
# Stat
|
||||
def Init(self, buf, pos):
|
||||
self._tab = flatbuffers.table.Table(buf, pos)
|
||||
|
||||
Reference in New Issue
Block a user