aboutsummaryrefslogtreecommitdiff
path: root/src/lua/api.c
blob: e2fdd3016095c2b29a6492f1e29d513c39743d9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "api.h"
#include "log.h"

bool lua_api_init(lua_api_t *lua)
{
    lua->state = luaL_newstate();
    luaL_openlibs(lua->state);
    luaL_requiref(lua->state, "log", lua_log_library, 1);
    lua_pop(lua->state, 1);
    return true;
}

void lua_api_close(lua_api_t *lua)
{
    lua_close(lua->state);
}