fixed comparator for native_inline (#7076)

* fixed comparator for native_inline

* added native_inline data

* updated more tests for the new field

* more fixes
This commit is contained in:
Derek Bailey
2022-02-02 23:44:43 -08:00
committed by GitHub
parent 826193ff68
commit 39c8a19ce2
26 changed files with 937 additions and 636 deletions

View File

@@ -392,13 +392,16 @@ class Monster : flatbuffers_handle
return MyGame_Example_Stat { buf_, buf_.flatbuffers_indirect(buf_.flatbuffers_field_vector(pos_, 104) + i * 4) }
def scalar_key_sorted_tables_length():
return buf_.flatbuffers_field_vector_len(pos_, 104)
def native_inline():
let o = buf_.flatbuffers_field_struct(pos_, 106)
return if o: MyGame_Example_Test { buf_, o } else: nil
def GetRootAsMonster(buf:string): return Monster { buf, buf.flatbuffers_indirect(0) }
struct MonsterBuilder:
b_:flatbuffers_builder
def start():
b_.StartObject(51)
b_.StartObject(52)
return this
def add_pos(pos:flatbuffers_offset):
b_.PrependStructSlot(0, pos)
@@ -550,6 +553,9 @@ struct MonsterBuilder:
def add_scalar_key_sorted_tables(scalar_key_sorted_tables:flatbuffers_offset):
b_.PrependUOffsetTRelativeSlot(50, scalar_key_sorted_tables)
return this
def add_native_inline(native_inline:flatbuffers_offset):
b_.PrependStructSlot(51, native_inline)
return this
def end():
return b_.EndObject()