chicken-users
[Top][All Lists]
Advanced

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

RE: [Chicken-users] SWIG for CHICKEN


From: Jonah Beckford
Subject: RE: [Chicken-users] SWIG for CHICKEN
Date: Fri, 14 Feb 2003 18:24:43 -0500

It seemed to make more sense to write the SWIG interface file and
document the steps involved with writing it, than piecemeal explaining
how to write an interface (I could see that the interface was going to
be small).  If you download the latest SWIG package from my web site 
(http://localhost/swig/swig-chicken-20030214.tar.gz), you will see the
example I put in for zlib.

I didn't exhaustively test it, but it seems to work and should be a good
base for your work ...

Jonah Beckford

P.S. You will need the latest CVS update of CHICKEN.

-----Original Message-----
From: Peter Keller [mailto:address@hidden 
Sent: February 14, 2003 4:06 AM
To: Jonah Beckford
Cc: address@hidden
Subject: Re: [Chicken-users] SWIG for CHICKEN


On Sun, Dec 15, 2002 at 11:24:34PM -0500, Jonah Beckford wrote:
> I have been augmenting SWIG to generate wrappers for CHICKEN.  I 
> haven't yet submitted my additions to the SWIG team ... I won't until 
> I can get some verification (from smarter CHICKEN developers) whether 
> the generated wrapper code looks reasonable.  So far, two simple C -> 
> CHICKEN examples run successfully on my cygwin box ... my short-term 
> goal is to get most of the SWIG Guile examples to run with CHICKEN.
> 
> SWIG Description:
> SWIG is a software development tool that connects programs written in 
> C and C++ with a variety of high-level programming languages. SWIG is 
> primarily used with common scripting languages such as Perl, Python, 
> Tcl/Tk, Ruby, Guile and MzScheme, however the list of supported 
> languages also includes non-scripting languages such as Java and 
> OCAML.
> 
> SWIG CHICKEN Page:
> http://beckford.homeip.net/swig/ [Doesn't have 99.999% uptime].
> 
> SWIG Page:
> http://www.swig.org

Hey, SWIG looks cool. I've heard about it, but never used it; so I'm 
checking it out now.

Out of curiosity though, how would you implement a swig interface file
for zlib? The main problem is that you must pass structures back and
forth from scheme to the c layer while being able to modify the contents
of the structure in scheme.

How would you represent this in swig? The interface for zlib is not that
big, and a google search will find you the manual for it extremely
quickly.

Thanks.

-pete





reply via email to

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