mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
Change to luaL_newlib().
This commit is contained in:
parent
9cb5220759
commit
97b1974039
@ -749,13 +749,12 @@ LSEC_API int luaopen_ssl_context(lua_State *L)
|
||||
luaL_setfuncs(L, meta, 0);
|
||||
|
||||
/* Create __index metamethods for context */
|
||||
lua_newtable(L);
|
||||
luaL_setfuncs(L, meta_index, 0);
|
||||
luaL_newlib(L, meta_index);
|
||||
lua_setfield(L, -2, "__index");
|
||||
|
||||
/* Return the module */
|
||||
lua_newtable(L);
|
||||
luaL_setfuncs(L, funcs, 0);
|
||||
luaL_newlib(L, funcs);
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -591,12 +591,10 @@ LSEC_API int luaopen_ssl_x509(lua_State *L)
|
||||
luaL_newmetatable(L, "SSL:Certificate");
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user