Hi I’m using the
Julia C interface to call a function from my dll
Everything works fine
Until I try to dereference it
first_row = unsafe_load(result_ptr)
firsr_num = unsafe_load(first_row)
#=
The matrix form is something like this 3x3
[ [ 1 0 0 ] [ 0 0 0 ] [0 0 0] ]
=#
-> 1
This is okay, but if I want to iterate over result_ptr,
the code will crash.
I think it is something like accessing NULL
, after the first time dereferencing result_ptr
it goes out of scope, I guess. So iteration can not be continued.
for example calling after the above example first_row = unsafe_load(result_ptr+1)
will crash the program.
My question is, how should I iterate over result_ptr
?