From 1e6ac084cf3f3b44295a55f0102dcbc4907c6fbb Mon Sep 17 00:00:00 2001 From: moteus Date: Thu, 26 Dec 2013 19:09:21 +0400 Subject: Fix. Register LuaJIT built-in libraries. --- src/llthread.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/llthread.c b/src/llthread.c index b61bf11..5bcd821 100644 --- a/src/llthread.c +++ b/src/llthread.c @@ -357,9 +357,25 @@ static void open_thread_libs(lua_State *L){ L_REGLIB(L, os, 1); L_REGLIB(L, math, 1); L_REGLIB(L, table, 1); - L_REGLIB(L, debug, 1); L_REGLIB(L, string, 1); +#ifdef LUA_DBLIBNAME + L_REGLIB(L, debug, 1); +#endif + +#ifdef LUA_BITLIBNAME + L_REGLIB(L, bit, 1); +#endif + +#ifdef LUA_JITLIBNAME + L_REGLIB(L, jit, 1); +#endif + +#ifdef LUA_FFILIBNAME + L_REGLIB(L, ffi, 1); +#endif + + lua_settop(L, top); #undef L_REGLIB } -- cgit v1.2.3-55-g6feb