From f31ba3ae992b3e5f1bfdba7af5a46cfb3f21512e Mon Sep 17 00:00:00 2001 From: mousebyte Date: Mon, 24 Jul 2023 13:35:29 -0400 Subject: [PATCH] Update html documentation --- docs/usage/cclass.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/usage/cclass.c b/docs/usage/cclass.c index 2fff816..4a0ef40 100644 --- a/docs/usage/cclass.c +++ b/docs/usage/cclass.c @@ -36,10 +36,7 @@ int main(void) { // leaves a copy of the class on the stack which can be modified and/or // loaded as a package - lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - lua_insert(L, -2); - lua_setfield(L, -2, "MyClass"); - lua_pop(L, 1); + luaC_setpackageloaded(L, "MyClass"); lua_pushnumber(L, 12); luaC_construct(L, 1, "MyClass");