range: Eliminate direct Range member access
authorMarkus Armbruster <armbru@redhat.com>
Fri, 1 Jul 2016 11:47:47 +0000 (13:47 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Jul 2016 13:49:33 +0000 (16:49 +0300)
commita0efbf16604770b9d805bcf210ec29942321134f
tree46e9cde32a5f519dab0d28f96a87ae74d4e72b4d
parent58e19e6e7914354242a67442d0006f9e31684d1a
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>
hw/i386/acpi-build.c
hw/pci-host/piix.c
hw/pci-host/q35.c
hw/pci/pci.c
include/qemu/range.h
qapi/string-input-visitor.c
qapi/string-output-visitor.c
util/log.c
util/range.c