How would I wrap a function that accepts an argument of type FILE using FFI in Ruby?
int fprintf ( FILE * stream, const char * format, ... );
How would I wrap a function that accepts an argument of type FILE using FFI in Ruby?
int fprintf ( FILE * stream, const char * format, ... );
Copyright © 2021 Jogjafile Inc.
It's not type
FILE, butFILE *. Just another:pointerlike any other.If you need to build a struct to examine the contents of the memory pointed to, you need to find the definition of
FILEin your system'sstdio.hand reproduce it as an FFI struct.