Fix generated EndVector. (#6385)
This commit is contained in:
parent
1bf1ec0270
commit
4363c1d2cb
|
@ -628,7 +628,7 @@ class PythonGenerator : public BaseGenerator {
|
|||
code += Indent + "builder.head = builder.head - len(bytes)\n";
|
||||
code += Indent + "builder.Bytes[builder.head : builder.head + len(bytes)]";
|
||||
code += " = bytes\n";
|
||||
code += Indent + "return builder.EndVector(len(bytes))\n";
|
||||
code += Indent + "return builder.EndVector()\n";
|
||||
}
|
||||
|
||||
// Get the offset of the end of a table.
|
||||
|
|
|
@ -785,7 +785,7 @@ def MonsterMakeTestnestedflatbufferVectorFromBytes(builder, bytes):
|
|||
builder.StartVector(1, len(bytes), 1)
|
||||
builder.head = builder.head - len(bytes)
|
||||
builder.Bytes[builder.head : builder.head + len(bytes)] = bytes
|
||||
return builder.EndVector(len(bytes))
|
||||
return builder.EndVector()
|
||||
def MonsterAddTestempty(builder, testempty): builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(testempty), 0)
|
||||
def MonsterAddTestbool(builder, testbool): builder.PrependBoolSlot(15, testbool, 0)
|
||||
def MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1): builder.PrependInt32Slot(16, testhashs32Fnv1, 0)
|
||||
|
@ -840,7 +840,7 @@ def MonsterMakeTestrequirednestedflatbufferVectorFromBytes(builder, bytes):
|
|||
builder.StartVector(1, len(bytes), 1)
|
||||
builder.head = builder.head - len(bytes)
|
||||
builder.Bytes[builder.head : builder.head + len(bytes)] = bytes
|
||||
return builder.EndVector(len(bytes))
|
||||
return builder.EndVector()
|
||||
def MonsterEnd(builder): return builder.EndObject()
|
||||
|
||||
import MyGame.Example.Ability
|
||||
|
|
Loading…
Reference in New Issue