From c2619cf06f41e31bc86e2d85bc464a4c4bdc2f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20L=C3=B6tscher?= Date: Thu, 11 Dec 2025 07:38:54 +0100 Subject: [PATCH] Remove obsolete fix in test helper --- spec/helpers.lua | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/spec/helpers.lua b/spec/helpers.lua index 00101f6..514dd66 100644 --- a/spec/helpers.lua +++ b/spec/helpers.lua @@ -4,26 +4,6 @@ require "vips" local assert = require "luassert.assert" local say = require "say" --- TODO: Wait for https://github.com/Olivine-Labs/luassert/issues/148 --- Meanwhile, we're applying patch #150 here. - --- Pre-load the ffi module, such that it becomes part of the environment --- and Busted will not try to GC and reload it. The ffi is not suited --- for that and will occasionally segfault if done so. -local ffi = require "ffi" - --- Patch ffi.cdef to only be called once with each definition, as it --- will error on re-registering. -local old_cdef = ffi.cdef -local exists = {} -ffi.cdef = function(def) - if exists[def] then - return - end - exists[def] = true - return old_cdef(def) -end - local function almost_equal(_, arguments) local threshold = arguments[3] or 0.001