Open nerzh opened 2 years ago
Hi, maybe it is impossible π«£ ? Then please tell me about it, then I will not try to make the code work π°
It's impossible for now...
It's impossible for now...
oh, that's sad to hear π Thanks for your answer π€
I also ran into this, trying to wrap a library that has a function that requires a struct passed by value. I could get around it with some type erasure, if only it was shorter -- a void* is 8 bytes and the struct is 16. Is this something that is not supported by libffi, or just not by fiddle?
It's just not implemented yet. We can do this by using FFI_TYPE_STRUCT
.
It's just not implemented yet. We can do this by using
FFI_TYPE_STRUCT
.
Be awesome if this could be implemented in a future version, for real ;)
Hi, sorry for my english. I will show the problem with examples:
header.h
How its work in ruby with gem ffi
ffi gem works, but sometimes i get segmentation fault :(
So I decided to try to do it with fiddle !
But how ? How to do it with fiddle ? I climbed the entire Internet. I haven't found a single example of how to pass a struct to a function. There are only very few examples of how to pass ordinary primitives and not a single example of how to pass a structure. I have tried many options and still have not been able to achieve a result. Please help me !!! Write an example of calling these functions and passing arguments to them. Really looking forward to the answer.
Here is what I do with fidl:
please help me with this π