diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-04 13:11:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-04 13:11:27 +0100 |
commit | 98591e36dbdfa483130d200dbe3423611dfbab81 (patch) | |
tree | 04f8cbc6bc69a07db94dc46bcb02f18d85b16dfe /lualib/lua_ffi | |
parent | 8d68b5d3ae90a9e34c83017f2a8248f093e4aa8a (diff) | |
download | rspamd-98591e36dbdfa483130d200dbe3423611dfbab81.tar.gz rspamd-98591e36dbdfa483130d200dbe3423611dfbab81.zip |
[Minor] Make lua_ffi more flexible to use
Diffstat (limited to 'lualib/lua_ffi')
-rw-r--r-- | lualib/lua_ffi/init.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lualib/lua_ffi/init.lua b/lualib/lua_ffi/init.lua index e5ca24a11..02b54f932 100644 --- a/lualib/lua_ffi/init.lua +++ b/lualib/lua_ffi/init.lua @@ -34,8 +34,7 @@ else local ret,result_or_err = pcall(require, 'ffi') if not ret then - io.stderr:write('FFI support is required: please use LuaJIT or install lua-ffi') - os.exit(1) + return {} end ffi = result_or_err @@ -51,4 +50,9 @@ exports.common = require "lua_ffi/common" exports.dkim = require "lua_ffi/dkim" exports.spf = require "lua_ffi/spf" +for k,v in pairs(ffi) do + -- Preserve all stuff to use lua_ffi as ffi itself + exports[k] = v +end + return exports
\ No newline at end of file |