[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using a C pointer in Guile
From: |
Bill Gribble |
Subject: |
Re: Using a C pointer in Guile |
Date: |
23 Oct 2001 17:14:09 -0500 |
On Tue, 2001-10-23 at 16:41, Brian McAndrews wrote:
> I want to have the ability to pass a C pointer to guile. I then want to
> modify the data structure pointed to by the pointer such that those changes
> are reflected back on the C side of things.
There are a lot of ways to do this. I prefer 'g-wrap' which is a tool
for wrapping C data types and functions for use by Scheme. It understands
the idea of C pointers and can wrap them up as Scheme objects. You can
get it at ftp://ftp.gnucash.org/pub/g-wrap. The current version 1.3.1 works
with guile 1.3.4, 1.4, and 1.5.x.
Yes, SMOBs are the low-level tool that gets used to represent the pointers,
but there's really no need to worry about that when you have a nice tool to
do the work for you :)
Bill Gribble