I'm working with SWIG 2.0 and I'm creating a Java wrapper for an API, as part of this API it has a structure that contains a multidimentional array:
typedef struct mbuf
{
data[2][31]
}
When it generates my proxy class it give me functions for getting the pointers to the array:
public void setData_buf_num1(int value) {
apiJNI.MBUF_data_buf_num1_set(swigCPtr, this, value);
}
public int getData_buf_num1() {
return apiJNI.MBUF_data_buf_num1_get(swigCPtr, this);
}
I understand they are giving me back read only pointers that can be passed to other C functions and I've tried using carray.i to give me access but with no luck,
I could not get the cast to work because my functions return int as the pointer and carray functions require SWIGTYPE_p_int.
All I want to do is access the elements of the array from the proxy class properly.
singned int getData(signed int i, signed int)?