|
@@ -114,8 +114,8 @@ struct LuaJITEngine : ScriptEngine { |
|
|
// Declare the function `_castBlock` used to transform `luaBlock` pointer into a LuaJIT cdata |
|
|
// Declare the function `_castBlock` used to transform `luaBlock` pointer into a LuaJIT cdata |
|
|
<< "_ffi_cast = ffi.cast" << std::endl |
|
|
<< "_ffi_cast = ffi.cast" << std::endl |
|
|
<< "function _castBlock(b) return _ffi_cast('struct LuaProcessBlock*', b) end" << std::endl |
|
|
<< "function _castBlock(b) return _ffi_cast('struct LuaProcessBlock*', b) end" << std::endl |
|
|
// Unload ffi and require |
|
|
|
|
|
<< "ffi = nil; require = nil;" << std::endl; |
|
|
|
|
|
|
|
|
// Remove global functions that could be abused |
|
|
|
|
|
<< "jit = nil; require = nil; ffi = nil; load = nil; loadfile = nil; loadstring = nil; dofile = nil;" << std::endl; |
|
|
std::string ffi_script = ffi_stream.str(); |
|
|
std::string ffi_script = ffi_stream.str(); |
|
|
|
|
|
|
|
|
// Compile the ffi script |
|
|
// Compile the ffi script |
|
|