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