0
構建我有以下功能的函數:wrapp其參數超出類型的指針使用痛飲
typedef struct tagT{
int a ;
int b ;
}Point;
int lib_a_f_5(Point *out_t)
{
out_t->a = 20;
out_t->b = 30;
return 0;
}
我應該如何引導痛飲生成的紅寶石(或LUA)正確的代碼? 把下面的語句接口文件時間:
%apply SWIGTYPE Point* {Point *out_t};
我得到了一個警告:
liba.i:7: Warning(453): Can't apply (Point *OUTPUT). No typemaps are defined.
難道我需要寫一個類型映射?我應該怎麼做?