diff options
-rw-r--r-- | hw/hw.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -398,6 +398,18 @@ extern const VMStateInfo vmstate_info_buffer; + type_check_array(_type,typeof_field(_state, _field),_num) \ } +#define VMSTATE_STRUCT_ARRAY_SIZE_UINT8(_field, _state, _field__num, _version, _vmsd, _type) { \ + .name = (stringify(_field)), \ + .num_offset = offsetof(_state, _field_num) \ + + type_check(uint8_t,typeof_field(_state, _field_num)), \ + .version_id = (_version), \ + .vmsd = &(_vmsd), \ + .size = sizeof(_type), \ + .flags = VMS_STRUCT|VMS_ARRAY, \ + .offset = offsetof(_state, _field) \ + + type_check_array(_type,typeof_field(_state, _field),_num) \ +} + #define VMSTATE_STATIC_BUFFER(_field, _state, _version) { \ .name = (stringify(_field)), \ .version_id = (_version), \ |