lua-userdata
How do I set up a metatable to inherit from another metatable while at the same time changing the userdata to another type?
This is something I want to do in C++ using the Lua C API. I\'m trying to figure out a good way to make userdata derive from a base userdata object.[详细]
2023-03-18 19:03 分类:问答Accessing Light userdata in Lua
I may be misunderstanding their use or misread the documentation, but how do I access memb开发者_如何学JAVAers of a struct or class passed to Lua as light userdata? For example if a vector using the f[详细]
2023-03-12 05:29 分类:问答Setting userdata as namespace in Lua
I have researched this subject and tried various approaches but I can\'t implement the behavior I have in mind (I\'m not even sure it\'s possible). Basically, I have several userdata objects created i[详细]
2023-02-11 03:02 分类:问答Lua userdata gc
Is it possible for a piece of Lua userdata to hold reference to a Lua object? (Like a table, or another piece of userdata?). Basically, what I want to know is:[详细]
2023-01-03 03:26 分类:问答Save reference to Lua's userdata
#1 Lua: local test = Test(); #2 C: //creating \"lua\'s test\" luaL_newmetatable(L, \"someTable\"); lua_userdata *userData = (lua_userdata *)lua_newuserdata(L, sizeof(lua_userdata));[详细]
2022-12-09 15:55 分类:问答