I have a project that currently has a C struct which has been defined as:
typedef struct IDList {
uint32_t listID;
uint32_t count;
uint32_t idArray[];
} __attribute__((packed, aligned(4))) IDList, *IDListPtr;
There is a method in an Objective-C class that returns an IDListPtr to me.
I know I can:
let idListPtr = theIDManager.getIDList() // ObjC class that returns the struct
let idList = idListPtr.pointee // Get the IDList struct from the pointer
And I know there are idList.count
items in the struct's array, but how do I access that array in Swift?