[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Binding function which takles multiple values
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Binding function which takles multiple values |
Date: |
Fri, 11 May 2007 09:07:35 +0200 |
On 5/10/07, Alex Queiroz <address@hidden> wrote:
Hallo,
I've got to bind one of the following functions:
handle* Hbox(Ihandle *child, ...);
handle* Hboxv(Ihandle **children);
Which one is easier in Chicken? I guess I'll have to create a list
using the C API, right?
The former:
(use dollar)
(define h1 ($ c-pointer HBox (c-pointer child1) (c-pointer child2)
(c-pointer child3)))
But if you want more type-safety, or a general Scheme-interface (not just
use HBox in some code), then you should indeed consider creating a
pointer list in C, or converting a Scheme list to such a pointer list).
cheers,
felix