I have this struct in C:
typedef struct THTensor {
...
ptrdiff_t storageOffset;
...
} THTensor;
However, the SWIG-generated Java code is:
public SWIGTYPE_p_ptrdiff_t getStorageOffset() {
return new SWIGTYPE_p_ptrdiff_t(THJNI.THFloatTensor_storageOffset_get(this.swigCPtr, this), true);
}
I'd like that ptrdiff_t
is converted to long
in Java, not this SWIGTYPE_p_ptrdiff_t
, in which I cannot access the actual long
value.
How can I control this in SWIG?