From f1649a43cdf7dd9e41496913672e82b30c067234 Mon Sep 17 00:00:00 2001 From: LoganDark Date: Mon, 8 Nov 2021 08:26:03 -0800 Subject: [PATCH] Add userdata to lua_Callbacks (#168) --- VM/include/lua.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VM/include/lua.h b/VM/include/lua.h index 2f93ad9..8e7d646 100644 --- a/VM/include/lua.h +++ b/VM/include/lua.h @@ -346,6 +346,8 @@ struct lua_Debug * can only be changed when the VM is not running any code */ struct lua_Callbacks { + void* userdata; /* arbitrary userdata pointer that is never overwritten by Luau */ + void (*interrupt)(lua_State* L, int gc); /* gets called at safepoints (loop back edges, call/ret, gc) if set */ void (*panic)(lua_State* L, int errcode); /* gets called when an unprotected error is raised (if longjmp is used) */