chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] C unions and structs, how to access them ?


From: Pupeno
Subject: Re: [Chicken-users] C unions and structs, how to access them ?
Date: Mon, 31 Oct 2005 12:44:14 -0300
User-agent: KMail/1.8.3

On Monday 31 October 2005 03:57, felix winkelmann wrote:
> > Now, the real question: How do I access XEvent's members and XEvent's
> > members' members ?
>
> You might also look into `define-foreign-record'.
> The xlib egg uses accessor-procedures for each and every
> structure member, which is ok, too (define-foreign-record does
> essentially the same).

Does define-foreign-record work for unions as well ?

Now, having tried a couple of approaches to this (as Schemish as possible), I 
am thinking of tring a different one.
What about making my own C function, let's call it ChXNextEvent that call 
XNextEvent and extracts the info from the XEvent and initializes a Scheme 
native structure or record ? Is that possible ? Is it a good way ? Any 
hints ?
Thank you.
-- 
Pupeno <address@hidden> (http://pupeno.com)

Attachment: pgp9JN2LcpcvS.pgp
Description: PGP signature


reply via email to

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