[Top][All Lists]

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

Re: [Chicken-users] Including C struct definitions

From: Joel Reymont
Subject: Re: [Chicken-users] Including C struct definitions
Date: Mon, 20 Dec 2004 10:52:19 +0000

> Nicolas Pelletier wrote:

>I am  using Chicken 1.72 and would  like to embed C  structs in Scheme
>code. Some fields in  these structures are themselves structued types,
>and csc gives an error on  such structures.


You might want to look at SWIG. 

I just finished wrapping a couple of libraries, including SDL
( SDL is a C library and the SDL event structure (a union
actually) might hold a keyboard event which has a nested keysym structure
and so on. 

The structures were wrapped correctly for me although I added some custom
access functions for nested structure members, mostly for performance
reasons. Otherwise every time I try to access the nested structure a copy
of it is allocated and returned to me.

    Thanks, Joel

OpenPoker: The Linux of poker software
Tenerife: Canary Islands: Spain

reply via email to

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