Fix sample_binary.py to use latest EndVector without a size. (#6478)
authorRichard A Hofer <rofer@google.com>
Fri, 19 Feb 2021 20:13:50 +0000 (15:13 -0500)
committerGitHub <noreply@github.com>
Fri, 19 Feb 2021 20:13:50 +0000 (12:13 -0800)
samples/sample_binary.py

index 96711fb..cd250a9 100644 (file)
@@ -55,13 +55,13 @@ def main():
   # Note: Since we prepend the bytes, this loop iterates in reverse order.
   for i in reversed(range(0, 10)):
     builder.PrependByte(i)
-  inv = builder.EndVector(10)
+  inv = builder.EndVector()
 
   MyGame.Sample.Monster.MonsterStartWeaponsVector(builder, 2)
   # Note: Since we prepend the data, prepend the weapons in reverse order.
   builder.PrependUOffsetTRelative(axe)
   builder.PrependUOffsetTRelative(sword)
-  weapons = builder.EndVector(2)
+  weapons = builder.EndVector()
 
   pos = MyGame.Sample.Vec3.CreateVec3(builder, 1.0, 2.0, 3.0)