Hi, with the C backend, the code below updates ptr in-place. However, with the FFI backend, ptr is unchanged (with both JRuby and TruffleRuby).
require"fiddle"ptr=Fiddle::Pointer["hello"]i=ptr.to_iptr.ref[0,Fiddle::SIZEOF_VOIDP]=Fiddle::Pointer["world"]pptr.to_i == i# false for C backend, true for FFI backend
I'm having trouble finding the cause (to try to make the behavior consistent), so wanted to see if anyone had ideas.
Hi, with the C backend, the code below updates
ptrin-place. However, with the FFI backend,ptris unchanged (with both JRuby and TruffleRuby).I'm having trouble finding the cause (to try to make the behavior consistent), so wanted to see if anyone had ideas.