mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2026-09-18 09:34:36 +07:00
fix some package usage
This commit is contained in:
@@ -2,9 +2,15 @@ local evo = require 'evolved'
|
||||
|
||||
---@type ffilib?
|
||||
local ffi = (function()
|
||||
local ffi_loader = package and package.preload and package.preload['ffi']
|
||||
local ffi = ffi_loader and ffi_loader()
|
||||
return ffi
|
||||
if package and package.loaded then
|
||||
local loaded_ffi = package.loaded.ffi
|
||||
if loaded_ffi then return loaded_ffi end
|
||||
end
|
||||
|
||||
if package and package.preload then
|
||||
local ffi_loader = package.preload.ffi
|
||||
if ffi_loader then return ffi_loader() end
|
||||
end
|
||||
end)()
|
||||
|
||||
if not ffi then
|
||||
|
||||
Reference in New Issue
Block a user