summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example/Stat.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/MyGame/Example/Stat.py')
-rw-r--r--tests/MyGame/Example/Stat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/MyGame/Example/Stat.py b/tests/MyGame/Example/Stat.py
index 71577e86..b0e251d4 100644
--- a/tests/MyGame/Example/Stat.py
+++ b/tests/MyGame/Example/Stat.py
@@ -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)