ClassDB is now in C++

This commit is contained in:
2020-11-13 18:17:47 -05:00
parent 9523e367f1
commit a784f12aed
13 changed files with 217 additions and 78 deletions

View File

@@ -10,17 +10,12 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "luajit.h"
}
#include <vector>
#include <string>
#include "lua-headers.hpp"
#include "util.hpp"
#include "lpx-table.hpp"
#include "lpx-classdb.hpp"
// Add another error status.
@@ -223,14 +218,16 @@ static int pmain(lua_State *L)
lua_gc(L, LUA_GCSTOP, 0);
luaopen_base(L);
// luaopen_package(L); // Omitted because we use our own package system.
luaopen_table(L);
// luaopen_io(L); // Not safe for the sandbox.
// luaopen_os(L); // Not safe for the sandbox.
luaopen_table(L); // Standard table operations.
luaopen_lpx_table(L); // Supplemental table operations.
// luaopen_io(L); // Not safe for the sandbox.
// luaopen_os(L); // Not safe for the sandbox.
luaopen_string(L);
luaopen_math(L);
// luaopen_debug(L); // Not safe for the sandbox.
luaopen_bit(L);
// luaopen_jit(L); // Don't know what it's for.
luaopen_lpx_classdb(L);
lua_gc(L, LUA_GCRESTART, -1);
loadmain(L);