From e7db790a0486f57a4c1bddd0708236173d4ba16b Mon Sep 17 00:00:00 2001 From: Pedro Gimeno Date: Fri, 12 Jun 2020 13:47:30 +0200 Subject: [PATCH] Future-proof metatable access --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 729dca1..346eca2 100644 --- a/init.lua +++ b/init.lua @@ -28,6 +28,10 @@ if not ie then return end +-- We need raw read access to the metatables for monkey-patching +local getmetatable = ie.debug.getmetatable +local setmetatable = setmetatable + local ok, ffi = pcall(ie.require, 'ffi') if not ok or not ffi then minetest.log("warning", err_prefix .. "FFI is not available in this system")