From 29e4a0512331a36c1cde22ed26c6ae059fa20757 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 8 Aug 2013 09:23:03 +0200 Subject: Adding libtommath, libtomcrypt and lcrypt, mainly for the bignum support. --- src/BLua.cc | 10 ++++++++++ src/LuaTask.cc | 1 + 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/BLua.cc b/src/BLua.cc index 3d47c72..22252d4 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -438,6 +438,16 @@ void Balau::Lua::open_bit() { while (n < gettop()) pop(); } +extern "C" { +int luaopen_lcrypt(lua_State *L); +} + +void Balau::Lua::open_lcrypt() { + int n = gettop(); + luaopen_lcrypt(L); + while (n < gettop()) pop(); +} + void Balau::Lua::declareFunc(const char * name, lua_CFunction f, int i) { checkstack(2); lua_pushstring(L, name); diff --git a/src/LuaTask.cc b/src/LuaTask.cc index cc0bb60..c22cb68 100644 --- a/src/LuaTask.cc +++ b/src/LuaTask.cc @@ -25,6 +25,7 @@ Balau::LuaMainTask::LuaMainTask() { L.open_bit(); L.open_jit(); L.open_ffi(); + L.open_lcrypt(); L.push("LuaMainTask"); L.push((void *) this); L.settable(LUA_REGISTRYINDEX); -- cgit v1.2.3