Update luvit FFI module path detection logic.

pull/47/merge
Robert G. Jakabosky 15 years ago
parent 8200e8f54a
commit 34e19cb65c

@ -1054,7 +1054,8 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
"if p_config == nil and p_cpath == nil then\n"
" ffi_load_cmodule = function(name, global)\n"
" for path,module in pairs(package.loaded) do\n"
" if type(module) == 'string' and path:match(name) == name then\n"
"print(\"luvit cmodule:\", path, module)\n"
" if module == name then\n"
" local C, err = ffi_safe_load(path, global)\n"
" -- return opened library\n"
" if C then return C end\n"

Loading…
Cancel
Save