]> Repositorios git - scryer-prolog.git/commitdiff
allow 3rd argument of ffi:read_ptr to not be a variable
authorSkgland <[email protected]>
Thu, 28 Aug 2025 22:36:35 +0000 (00:36 +0200)
committerBennet Bleßmann <[email protected]>
Thu, 28 Aug 2025 22:36:35 +0000 (00:36 +0200)
src/lib/ffi.pl

index 35a56195ddf4e25953e9d2a2414ef2b4443b9e6d..385d8c79a95846a9ed28ae493ccf159600027b00 100644 (file)
@@ -146,7 +146,6 @@ allocate(Allocator, Type, Args, Ptr) :-
 % For type cstr take read a nul-terminated utf-8 string starting at Ptr.
 %
 read_ptr(Type, Ptr, Value) :-
-    must_be(var, Value),
     must_be(atom, Type),
     must_be(integer, Ptr),
     '$ffi_read_ptr'(Type, Ptr, Value).