Add userdata to global_State

This commit is contained in:
LoganDark 2021-11-07 08:42:15 -08:00
parent 16753a78f4
commit 2a26c09660
No known key found for this signature in database
GPG key ID: B8C37CEDE1AC60EA
2 changed files with 3 additions and 0 deletions

View file

@ -181,6 +181,7 @@ lua_State* lua_newstate(lua_Alloc f, void* ud)
g->cb = lua_Callbacks();
g->gcstats = GCStats();
g->userdata = NULL;
if (luaD_rawrunprotected(L, f_luaopen, NULL) != 0)
{

View file

@ -189,6 +189,8 @@ typedef struct global_State
GCStats gcstats;
void* userdata;
} global_State;
// clang-format on