range: Eliminate direct Range member access
Users of struct Range mess liberally with its members, which makes refactoring hard. Create a set of methods, and convert all users to call them instead of accessing members. The methods have carefully worded contracts, and use assertions to check them. Signed-off-by:Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
Showing
- hw/i386/acpi-build.c 19 additions, 16 deletionshw/i386/acpi-build.c
- hw/pci-host/piix.c 18 additions, 8 deletionshw/pci-host/piix.c
- hw/pci-host/q35.c 27 additions, 14 deletionshw/pci-host/q35.c
- hw/pci/pci.c 9 additions, 8 deletionshw/pci/pci.c
- include/qemu/range.h 83 additions, 2 deletionsinclude/qemu/range.h
- qapi/string-input-visitor.c 8 additions, 12 deletionsqapi/string-input-visitor.c
- qapi/string-output-visitor.c 9 additions, 9 deletionsqapi/string-output-visitor.c
- util/log.c 2 additions, 3 deletionsutil/log.c
- util/range.c 1 addition, 2 deletionsutil/range.c
Loading
Please register or sign in to comment