fix UB in ffi tests

This commit is contained in:
Bennet Bleßmann
2025-01-27 21:55:34 +01:00
committed by Bennet Bleßmann
parent e1246f0c83
commit 760e1d2aac
6 changed files with 28 additions and 26 deletions

View File

@@ -2,7 +2,9 @@
:- use_module(library(ffi)).
test :-
getenv("ffi_return_values_LIB", LIB),
read(Body),
term_variables(Body, [LIB]),
Body,
use_foreign_module(LIB, [
'ffi_return_values_true'([], bool),
'ffi_return_values_false'([], bool),