0
如何包裝這個如何包裝C結構/類SWIG內部陣列,在不改變C代碼
class Foobar {
public:
int member[];
}
在SWIG
,在不改變此C++代碼??
這裏是一個很好的職位,解釋了很多,
SWIG/python array inside structure
,但它的工作方式,你必須改變的C++代碼,使其能夠包裝。我不能那樣做。
如何包裝這個如何包裝C結構/類SWIG內部陣列,在不改變C代碼
class Foobar {
public:
int member[];
}
在SWIG
,在不改變此C++代碼??
這裏是一個很好的職位,解釋了很多,
SWIG/python array inside structure
,但它的工作方式,你必須改變的C++代碼,使其能夠包裝。我不能那樣做。
那麼它看起來像我可以更進一步比SWIG/python array inside structure 我改變上面的原代碼foobar.h
到:
class Foobar {
public:
int_array_wrapper member;
}
,然後,我既可以#include
和%include
這foobar_modified_for_swig.h
在我痛飲接口代碼,同時,原來的仍然會使用foobar.h
和這兩個鏈接在一起並顯示工作。不知道爲什麼這個工程,但它似乎工作。