On 06/04/2007 04:30 PM, John Lenz wrote:
> On 05/22/2007 12:57 AM, Dan Muresan wrote:
>> Hi,
>>
>> for a C structure named my_class, swig -chicken -proxy generates a
>> TinyCLOS class <my-class>; however, functions that take a my_class
>> argument are wrapped incorrectly:
>>
>> void print (my_class *c)
>>
>> becomes
>>
>> (define-method (print (c <my_class)) ...)
>>
>> (dash vs. underscore)
>>
>> I'm using SWIG 1.3.28-1.1ubuntu1 (on Ubuntu).
>>
>
> Sorry for the late reply... could you file a bug on sourceforge so we
> can keep track of this problem, and also include a simple example .i
> file that exhibits the problem? I will take a look at it.
>
Actually, I just tried in a .i file (on the latest SVN... Revision 9846)
%inline %{
/* Chicken had a problem when wrapping a class name with an underscore
in a helper function */
class Test_Underscore {
public:
int a;
};
int test_underscore(Test_Underscore *t) {
return t->a;
}
%}
and in cpp_basic.scm I got
(define-method (test-underscore (arg0 <Test-Underscore>)) ((vector-ref
swig-init-return 27) (slot-ref arg0 'swig-this)))
so perhaps you could try the latest verion 1.3.31 or latest SVN (not
much has changed between 1.3.31 and the latest SVN for the chicken module).
John
|