chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: easyffi c++ passing object pointers


From: Dave
Subject: [Chicken-users] Re: easyffi c++ passing object pointers
Date: Wed, 05 Nov 2003 23:05:05 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Thanks, Felix, it works like a charm! It's getting almost too easy to interface to C++, you're going to spoil us :)

-Dave

felix wrote:

Argh. I didn't think of this. It's currently not really possible
to create a TinyCLOS instance from a C++ pointer. Thanks for pointing
this out! I have now implemented the following (slightly crude) method: the
initargs for the invocation of `make' can alternatively be the symbol 'this
followed by a pointer, so you would have something like this:

(define-entry-point 1 ((ptr c-pointer)) (int)
 (let ([a (make <ClientApp> 'this a)])
   (print (ChickenCallin a "bing"))
   1) )

Normally the initargs are passed to the C++ constructor. If 'this
is given, the C++ constructor will not be invoked.

I'll check this in the CVS in a few moments.


cheers,
felix






reply via email to

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