我有一个包含原始字段(int,uint8,...)和指针的结构。 这些指针通常指向一个不同结构类型的数组,以保持深度嵌套结构。 例如,在C: struct A
{
int field1;
int field2;
struct B *fields3;
unsigned int countofb;
}
struct B
{
int anotherfield1;
i
说完看着这样一个问题: ctypes: How do I define an array of a structure as a field of another structure? 现在我想实现我的版本的解决方案,但在len_a的struct Arr输出不同于它在C中的设置。我的问题是:什么是将Parse.arr设置为python中的一个Arr对象数组的正确方法是什么?(最初是在C中分配/设置
Ç阵列我有一个C函数: void func(int n, int m)
{
int Array[n][m];
make_magic(Array);
}
这使得2D阵列和处理它。我在python3.5使用本功能与ctypes的是这样的: from ctypes import *
magic = CDLL('lib_name')
magic.func(n,m)
所