chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] FFI: wrapping method that returns object


From: Sergey Khorev
Subject: [Chicken-users] FFI: wrapping method that returns object
Date: Mon, 20 Sep 2004 10:02:41 +0400

Is there an easy way to teach Chicken to process the declarations below?
Maybe some magic with ___declare(type,...)?

#>!
class T
{
public:
    T() {}
    int m(int i) { return i + 1 }
};

class A
{
public:
    A() {}
    T makeT()
    {
        T t;
        return t;
    }
};
<#

Of course one can write wrapper like 
T* makeT_() { return new T(makeT()); }
But this is too boring, especially for dozens of such methods.




reply via email to

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