我使用过类型映射:
%include "typemaps.i"
%apply SWIGTYPE * {char *deci};
这是 SWIG 生成的代理类:
public class SWIGTYPE_p_char {
private long swigCPtr;
protected SWIGTYPE_p_char(long cPtr, boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_char() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_char obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}