mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-type
The VMSTATE_STRUCT_POINTER macros are a bit odd in that they must be passed an argument "FooType *" rather than just taking the FooType. They're only used in one place, so it's easy to tidy this up. This also lets us use the macro to replace the hand-rolled VMSTATE_PTIMER. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
8cfc114a2f
commit
20bcf73fa8
3 changed files with 7 additions and 13 deletions
|
@ -27,14 +27,8 @@ void ptimer_stop(ptimer_state *s);
|
|||
|
||||
extern const VMStateDescription vmstate_ptimer;
|
||||
|
||||
#define VMSTATE_PTIMER(_field, _state) { \
|
||||
.name = (stringify(_field)), \
|
||||
.version_id = (1), \
|
||||
.vmsd = &vmstate_ptimer, \
|
||||
.size = sizeof(ptimer_state *), \
|
||||
.flags = VMS_STRUCT|VMS_POINTER, \
|
||||
.offset = vmstate_offset_pointer(_state, _field, ptimer_state), \
|
||||
}
|
||||
#define VMSTATE_PTIMER(_field, _state) \
|
||||
VMSTATE_STRUCT_POINTER_V(_field, _state, 1, vmstate_ptimer, ptimer_state)
|
||||
|
||||
#define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \
|
||||
VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, 0, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue