I'm running in to problems converting constant structures into Ruby
objects. I have something like:
%module Dave
%{
struct A {
int i;
};
const A ONE = {1};
%}
struct A {
int i;
};
const A ONE = {1};
and swigging it, I get:
t_wrap.c: In function `void Init_Dave()':
t_wrap.c:361: cannot convert `ONE' from type `const A' to type `void *'
because of
rb_define_const(mDave, "ONE", SWIG_NewPointerObj((void *)ONE, SWIGTYPE_p_A));
Is there anyway to tell SWIG that this isn't a pointer?
Thanks
Dave