Allow passing function instead of name for specialty structure member definitions.
Develop API for specialty structure member definitions (e.g. size_of
, dims_of
, etc.) that allow a function to be passed instead of the name. For example:
def get_size(parent):
return parent.size
class MyStruct(Structure):
size: UInt8
string: AscStr = size_via(get_size)