luaL_newlib is the way
This commit is contained in:
parent
e4bf16bd57
commit
890c0dd514
|
@ -25,8 +25,7 @@ bool loadapi_draw(lua_State *lua) {
|
|||
{ "circle", api_draw_circle },
|
||||
{ "ring", api_draw_ring },
|
||||
};
|
||||
lua_newtable(lua);
|
||||
luaL_setfuncs(lua, api_draw, 0);
|
||||
luaL_newlib(lua, api_draw);
|
||||
lua_setglobal(lua, "Draw");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue