chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] what are pointers (in scheme)


From: felix winkelmann
Subject: Re: [Chicken-users] what are pointers (in scheme)
Date: Thu, 29 Nov 2007 08:57:26 +0100

On Nov 29, 2007 6:01 AM, Stephan Lukits <address@hidden> wrote:
> Hi,
>
> could anyone please direct my to the right documentation
> for using eggs which implement c-libraries?
>
> I have no idear how I should call function like
>
> (sx:open-display INT (POINTER (POINTER CHAR)))
>
> and how I get the data which will be bound to
> the (two-dimensional I guess) "pointer"?

Hi!

Some APIs are generated semi-automatically, for example using
easyffi. The C function behind sx:open-display expects an argc/argv
argument pair, which is not directly representable in Scheme, but
(and this is exclusively for this particular case) "(argc+argv)" will return
two values that can be passed to the mentioned function.

In case of the sx egg: you don't need to call sx:open-display, this is
done automatically.


cheers,
felix




reply via email to

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