[英]How to handle a pointer to a pointer with Python and ctypes
I'm trying to model a struct found in a library I'm wrapping, where the struct has a pointer-to-a-pointer like this: 我正在尝试对在我包装的库中找到的结构进行建模,该结构中的指针指向如下所示:
typedef struct item_t {
char* name;
}
typedef struct container_t {
item_t **items;
}
How, when modeling with Python's ctypes
module's Structure
class, would I represent an array of pointers with a variable length? 在使用Python的
ctypes
模块的Structure
类进行建模时,如何表示一个长度可变的指针数组?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.