[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] easyffi - continued.
From: |
felix |
Subject: |
[Chicken-users] easyffi - continued. |
Date: |
Wed, 01 Oct 2003 21:48:29 +0200 |
User-agent: |
Opera7.11/Linux M2 build 406 |
Hello!
The "easy" FFI parser now understands a little C++. Classes are wrapped
into TinyCLOS classes, so you can do things like:
;;; sample.scm
(declare (uses tinyclos))
#>!
class Foo {
public:
Foo() {}
int yo(int n) { return n * 2; }
};
<#
(define f1 (make <Foo>))
(yo f1 123) ==> 246
(destroy f1) ; alternatively: (set-finalizer! f1 destroy)
Needless to say, the C++ parser has a *lot* of restrictions, but for
simple cases, and hand-tuned C++ headerfiles it might prove useful.
cheers,
felix
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-users] easyffi - continued.,
felix <=