Change to luaL_newlib().

This commit is contained in:
Bruno Silvestre
2015-02-06 17:44:08 -02:00
parent 9cb5220759
commit 97b1974039
3 changed files with 7 additions and 12 deletions

View File

@ -868,12 +868,10 @@ LSEC_API int luaopen_ssl_core(lua_State *L)
luaL_newmetatable(L, "SSL:Connection");
luaL_setfuncs(L, meta, 0);
lua_newtable(L);
luaL_setfuncs(L, methods, 0);
luaL_newlib(L, methods);
lua_setfield(L, -2, "__index");
lua_newtable(L);
luaL_setfuncs(L, funcs, 0);
luaL_newlib(L, funcs);
return 1;
}