mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 13:08:58 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user