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

@@ -677,8 +677,18 @@ function mt:ScalarKeySortedTablesLength()
return 0
end
function mt:NativeInline()
local o = self.view:Offset(106)
if o ~= 0 then
local x = self.view.pos + o
local obj = __MyGame_Example_Test.New()
obj:Init(self.view.bytes, x)
return obj
end
end
function Monster.Start(builder)
builder:StartObject(51)
builder:StartObject(52)
end
function Monster.AddPos(builder, pos)
@@ -961,6 +971,10 @@ function Monster.StartScalarKeySortedTablesVector(builder, numElems)
return builder:StartVector(4, numElems, 4)
end
function Monster.AddNativeInline(builder, nativeInline)
builder:PrependStructSlot(51, nativeInline, 0)
end
function Monster.End(builder)
return builder:EndObject()
end