[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ffi varargs support

From: Matt Wette
Subject: ffi varargs support
Date: Sun, 13 Aug 2017 13:59:50 -0700

libffi will have support for varargs in the future.  How could the syntax in 
Guile be handled?

How about ellipsis symbol in pointer->procedure and a pair for each va-arg: 
type in car and value in car?

> (define p (dynamic-func “printf” (dynamic-link)))
> (define f (pointer->procedure int p (list ‘* ‘…)))
> (f (string->pointer “n = %d\n”) `(int . 30))
n = 10

reply via email to

[Prev in Thread] Current Thread [Next in Thread]