[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] New "easy" FFI
From: |
felix |
Subject: |
[Chicken-users] New "easy" FFI |
Date: |
Mon, 22 Sep 2003 23:06:16 +0200 |
User-agent: |
Opera7.11/Linux M2 build 406 |
Hiya!
Chicken got a new FFI interface (informally called the "easy" FFI).
It parses a subset of C and generates procedure and variable bindings
from declarations, like this:
#>! #include <math.h>
#define my_pi 3.14
int var = 99;
extern double sin(double);
<#
(print (sin my_pi))
(print (var))
(var 123)
(print (var)) ; now 123
The parser does basic macro substitution, handles simple macros,
enums, typedefs, variable declarations and function prototypes.
Most preprocessor commands are implemented.
To play with it, you need to fetch the current CVS sources.
cheers,
felix
- [Chicken-users] New "easy" FFI,
felix <=