Category : luajit

I’m trying to write a new require function (called "require2" to avoid confusion). This function should pause (suspend) the Lua state, wait for the server to send the .lua file, and then run the .lua file and continue (resume). I couldn’t get this to work in Lua 5.1, 5.4.2, or using LuaJit. It always results ..

Read more

For historical reasons, I am constructing a struct in C++ that emulates a lua Table. typedef union Value Value; typedef struct LuaTable LuaTable; typedef struct TableValue TableValue; enum ValueType { INT = 0, BOOL = 1, FLOAT = 2, STRING = 3, TABLE = 4, }; struct LuaTable { std::vector<TableValue> array; std::map<std::string, TableValue> hashmap; }; ..

Read more