unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* dynamic ffi and C struct
@ 2012-05-19 11:32 cong gu
  2012-05-20  0:45 ` Mark H Weaver
  0 siblings, 1 reply; 3+ messages in thread
From: cong gu @ 2012-05-19 11:32 UTC (permalink / raw)
  To: guile-user

Hello,

Is it possible to use the current dynamic ffi to call a C function
whose parameter is a C struct (not a pointer to a C struct) ?

I cannot find much about it in the documentation.  After a brief look
at the source of foreign.c of guile, I found guile actually does some
parsing of nested argument list for `pointer->procedure' and generates
compound ffi types.  But I don't know the right data structure to give
when actually calling the foreign function.

For example, what should I do for the following function?

typedef struct {
  int dat[2];
} foo_t;

int func ( foo_t arg );

-- 
Cong Gu



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-20  3:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-19 11:32 dynamic ffi and C struct cong gu
2012-05-20  0:45 ` Mark H Weaver
2012-05-20  3:40   ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).