From 2ac98f05724b8aabeb9296943371a892d3d12436 Mon Sep 17 00:00:00 2001 From: goffioul Date: Mon, 24 Oct 2005 09:38:48 +0000 Subject: [PATCH] Avoid the garbage collection of foreign modules. --- src/c/ffi.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/c/ffi.d b/src/c/ffi.d index 516373591..80243fee3 100644 --- a/src/c/ffi.d +++ b/src/c/ffi.d @@ -417,8 +417,10 @@ OUTPUT: mp_giveup_lock(symbol_value(@'mp::+load-compile-lock+')); } CL_UNWIND_PROTECT_END; #endif - if (type_of(output) == t_codeblock) + if (type_of(output) == t_codeblock) { + output->cblock.locked |= 1; @(return output) + } else FEerror("LOAD-FOREIGN-MODULE: Could not load foreign module ~S (Error: ~S)", 2, filename, output); }