allow 3rd argument of ffi:read_ptr to not be a variable
This commit is contained in:
@@ -146,7 +146,6 @@ allocate(Allocator, Type, Args, Ptr) :-
|
|||||||
% For type cstr take read a nul-terminated utf-8 string starting at Ptr.
|
% For type cstr take read a nul-terminated utf-8 string starting at Ptr.
|
||||||
%
|
%
|
||||||
read_ptr(Type, Ptr, Value) :-
|
read_ptr(Type, Ptr, Value) :-
|
||||||
must_be(var, Value),
|
|
||||||
must_be(atom, Type),
|
must_be(atom, Type),
|
||||||
must_be(integer, Ptr),
|
must_be(integer, Ptr),
|
||||||
'$ffi_read_ptr'(Type, Ptr, Value).
|
'$ffi_read_ptr'(Type, Ptr, Value).
|
||||||
|
|||||||
Reference in New Issue
Block a user