C側に文字配列を含む構造があります
stuct s
{
int x;
char buffer[100];
}
そして私のpython側で私は定義します
class myS(ctypes.Structure):
_fields_ = [("x", c_int),
("buffer",type(create_string_buffer(100)))]
今、私がするとき
buf = create_string_buffer(64)
s1 = myS(10,buf)
それは私にエラーを与える
TypeError: expected string or Unicode object, c_char_Array_100 found
C 関数によって変更される文字列が必要です。どうやってするの?