[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
working to update pointer->procedure
From: |
Matt Wette |
Subject: |
working to update pointer->procedure |
Date: |
Fri, 30 Nov 2018 15:32:17 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- working to update pointer->procedure,
Matt Wette <=