anchor.diff:  -type mystring() :: [1..255].
   -type byte() :: 0..255.
   
  +
   %% auxilary functions
   -spec cstr_list_comp(mystring()) -> boolean().
   cstr_list_comp(Str) ->
       CStr = nifty:list_to_cstr(Str),
  -    Ret = nifty:dereference(CStr) =:= Str,
  +    DStr = nifty:dereference(CStr),
       ok = nifty:free(CStr),
  -    Ret.
  +    DStr =:= Str.
  +
  +short_comp(Sh) ->
  +    P = nifty:pointer_of(Sh, "unsigned short"),
  +    DSh = nifty:dereference(P),
  +    ok = nifty:free(P),
  +    Sh =:= DSh.
   
   -spec write_read([byte()]) -> boolean().
   write_read(Data) ->
       Ptr = nifty:mem_write(Data),
  -    Ret = nifty:mem_read(Ptr, length(Data)) =:= Data,
  +    DData = nifty:mem_read(Ptr, length(Data)),
       ok = nifty:free(Ptr),
  -    Ret.
  +    DData =:= Data.
   
   %% properties
   -spec prop_cstr_list() -> proper:outer_test().
  
positive.code: -module(nifty_lib_test).
  -export([cstr_list_test/0,
  	 read_write_test/0,
  	 int_deref_test/0]).
  
  -include_lib("proper/include/proper.hrl").
  
negative.code:     -1 = nifty:dereference(nifty:as_type(Ptr, nifty, "long long *")),
      ok = nifty:free(Ptr),
      true.
  