Skip to content

Commit f31ba3a

Browse files
committed
Update html documentation
1 parent 5f6adbe commit f31ba3a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

docs/usage/cclass.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ int main(void) {
3636

3737
// leaves a copy of the class on the stack which can be modified and/or
3838
// loaded as a package
39-
lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
40-
lua_insert(L, -2);
41-
lua_setfield(L, -2, "MyClass");
42-
lua_pop(L, 1);
39+
luaC_setpackageloaded(L, "MyClass");
4340

4441
lua_pushnumber(L, 12);
4542
luaC_construct(L, 1, "MyClass");

0 commit comments

Comments
 (0)