これが私のCインターフェースです:
typedef uint16_t my_type1;
typedef uint8_t my_type2;
int my_func(my_type1 * arg1, my_type2 * arg2) {
*arg1 = *arge + 1;
}
これで、インターフェイスファイルを次のように定義すると機能します。
%include "stdini.i"
%include "cpointer.i"
typedef uint16_t my_type1;
typedef uint8_t my_type2;
%pointer_functions(my_type1, my_type1_p);
%pointer_functions(my_type2, my_type2_p);
しかし、私はそれをで動作させることができないようです%pointer_class
。それはいつも私にエラーを与えます:
TypeError:不透明なPythonポインターをCポインターに変換できませんでした。