lite-xl/src/api/api.c

23 lines
499 B
C
Raw Permalink Normal View History

2019-12-28 12:16:32 +01:00
#include "api.h"
int luaopen_system(lua_State *L);
int luaopen_renderer(lua_State *L);
int luaopen_regex(lua_State *L);
2021-06-18 20:19:09 +02:00
int luaopen_process(lua_State *L);
2019-12-28 12:16:32 +01:00
static const luaL_Reg libs[] = {
{ "system", luaopen_system },
{ "renderer", luaopen_renderer },
{ "regex", luaopen_regex },
2021-06-18 20:19:09 +02:00
{ "process", luaopen_process },
2019-12-28 12:16:32 +01:00
{ NULL, NULL }
};
void api_load_libs(lua_State *L) {
for (int i = 0; libs[i].name; i++) {
luaL_requiref(L, libs[i].name, libs[i].func, 1);
}
}