[Lua] Add pand module

This commit is contained in:
wheremyfoodat 2023-09-17 22:11:21 +03:00
parent 74026d2faa
commit baa9cab051

View file

@ -62,15 +62,20 @@ MAKE_MEMORY_FUNCTIONS(32)
MAKE_MEMORY_FUNCTIONS(64) MAKE_MEMORY_FUNCTIONS(64)
#undef MAKE_MEMORY_FUNCTIONS #undef MAKE_MEMORY_FUNCTIONS
void LuaManager::initializeThunks() { // clang-format off
lua_register(L, "read8", read8Thunk); static constexpr luaL_Reg functions[] = {
lua_register(L, "read16", read16Thunk); { "read8", read8Thunk },
lua_register(L, "read32", read32Thunk); { "read16", read16Thunk },
lua_register(L, "read64", read64Thunk); { "read32", read32Thunk },
lua_register(L, "write8", write8Thunk); { "read64", read64Thunk },
lua_register(L, "write16", write16Thunk); { "write8", write8Thunk} ,
lua_register(L, "write32", write32Thunk); { "write16", write16Thunk },
lua_register(L, "write64", write64Thunk); { "write32", write32Thunk },
} { "write64", write64Thunk },
{ nullptr, nullptr },
};
// clang-format on
void LuaManager::initializeThunks() { luaL_register(L, "pand", functions); }
#endif #endif