Can you get a struct *
from the out parameter of a C function in Chibi Scheme?
I'm trying to get a struct archive_entry *
from this C function:
int archive_read_next_header(
struct archive *archive,
struct archive_entry **out_entry);
In C one would do it like this:
struct archive_entry *entry;
archive_read_next_header(archive, &entry);
My Chibi FFI code is:
(define-c-struct archive)
(define-c-struct archive_entry)
(define-c int
archive-read-next-header
(archive (result reference archive_entry)))
But it's not generating the right C code to get the archive_entry
. I
think reference
is the wrong thing to use. I also tried pointer
but it didn't work either.