* working to update pointer->procedure
@ 2018-11-30 23:32 Matt Wette
0 siblings, 0 replies; only message in thread
From: Matt Wette @ 2018-11-30 23:32 UTC (permalink / raw)
To: guile-devel
Hi All,
I'm starting to look into libguile/foreign.c to add support for libffi's variadic
function calls. My thinking is that that pointer->procedure would accept '... as
the last element of the arg list, and that on procedure calls one would pass a pair
to for each unspecified argument. The car of the pair is the ffi type (e.g., int)
and the car is the value.
(use (system foreign))
(define scm-printf (pointer->procedure int (dynamic-func "printf") ('* '...)))
(scm-printf (string->pointer "ans=%d\n") (cons int 4))
Comments?
Matt
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-30 23:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 23:32 working to update pointer->procedure Matt Wette
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).