1 | #include "api.h" |
2 | |
3 | int luaopen_system(lua_State *L); |
4 | int luaopen_renderer(lua_State *L); |
5 | int luaopen_regex(lua_State *L); |
6 | int luaopen_process(lua_State *L); |
7 | int luaopen_dirmonitor(lua_State* L); |
8 | int (lua_State* L); |
9 | |
10 | static const luaL_Reg libs[] = { |
11 | { "system" , luaopen_system }, |
12 | { "renderer" , luaopen_renderer }, |
13 | { "regex" , luaopen_regex }, |
14 | { "process" , luaopen_process }, |
15 | { "dirmonitor" , luaopen_dirmonitor }, |
16 | { "utf8extra" , luaopen_utf8extra }, |
17 | { NULL, NULL } |
18 | }; |
19 | |
20 | |
21 | void api_load_libs(lua_State *L) { |
22 | for (int i = 0; libs[i].name; i++) |
23 | luaL_requiref(L, libs[i].name, libs[i].func, 1); |
24 | } |
25 | |
26 | |