A common pattern in C libraries is to make the final member of a struct an array whose length is determined at runtime, like this example from the sanlock library:
struct sanlk_resource {
char lockspace_name[SANLK_NAME_LEN]; /* terminating \0 not required */char name[SANLK_NAME_LEN]; /* terminating \0 not required *//* ... */uint32_t num_disks;
/* followed by num_disks sanlk_disk structs */struct sanlk_disk disks[0];
};
Ctypes doesn't currently offer much/any support for this pattern, but it's sufficiently common that we ought to support it.
The text was updated successfully, but these errors were encountered:
A common pattern in C libraries is to make the final member of a struct an array whose length is determined at runtime, like this example from the sanlock library:
Ctypes doesn't currently offer much/any support for this pattern, but it's sufficiently common that we ought to support it.
The text was updated successfully, but these errors were encountered: