Answer the question
In order to leave comments, you need to log in
Lua how to add data to a table so that it can be seen from C but not visible from Lua itself?
There was such, there is Lua and C code.
The C code creates a table and registers it as a global one, after which it attaches a metatable with the __index method to it, according to which, depending on the index, it returns other tables of the same type, also creating them in C.
I want to process data changes in these tables in C, I can also hang a metatable on them, but how can I understand by what index these tables were created? Is it possible somehow in Lua to attach data to the table that is visible only from C? Or maybe there is a better way to solve this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question