fix some package usage

This commit is contained in:
BlackMATov
2026-02-03 06:11:58 +07:00
parent d1105c15ad
commit 260f841a3b
2 changed files with 30 additions and 9 deletions
+9 -3
View File
@@ -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