flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Why GetRootAs does not support using a pointer plus length as a parameter to a function

Open rampage-raw opened this issue 3 years ago • 2 comments

FlatBuffer 2.0 Language:Lua like this: local mon = monster.GetRootAsMonster(ptr, len)

rampage-raw avatar Nov 16 '22 08:11 rampage-raw

I have found that it is like this in luatest.lua file : local mon = monster.GetRootAsMonster(buf, offset).

enum-class avatar Nov 17 '22 05:11 enum-class

I have found that it is like this in luatest.lua file : local mon = monster.GetRootAsMonster(buf, offset).

I want the argument to the function to be a ptr instead of a string

rampage-raw avatar Nov 17 '22 06:11 rampage-raw

I did this on my own Add the pointer versions of string.unpack and string.sub to the lua source code, and then modify the lua code for flatbuffers

rampage-raw avatar Nov 30 '22 11:11 rampage-raw

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar May 31 '23 20:05 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Jun 14 '23 20:06 github-actions[bot]