Feature: lua now file_ident aware (#8850)

* lua code not file ident aware

* update genned code

* make mac happy

* pr comments
This commit is contained in:
Justin Davis
2026-02-04 08:05:08 -05:00
committed by GitHub
parent b84b676c89
commit e53732b9b9
3 changed files with 87 additions and 5 deletions

View File

@@ -28,6 +28,8 @@ function Monster.New()
return o
end
local FileIdentifier = "MONS"
function Monster.GetRootAsMonster(buf, offset)
if type(buf) == "string" then
buf = flatbuffers.binaryArray.New(buf)
@@ -1099,4 +1101,12 @@ function Monster.End(builder)
return builder:EndObject()
end
function Monster.FinishMonsterBuffer(builder, offset)
builder:FinishWithIdentifier(offset, FileIdentifier)
end
function Monster.FinishSizePrefixedMonsterBuffer(builder, offset)
builder:FinishSizePrefixedWithIdentifier(offset, FileIdentifier)
end
return Monster