Re: [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-20 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Jun 15, 2016 at 10:41:48PM +0200, Markus Armbruster wrote: >> 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 h

Re: [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-18 Thread Michael S. Tsirkin
On Wed, Jun 15, 2016 at 10:41:48PM +0200, Markus Armbruster wrote: > 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, an

Re: [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-16 Thread Markus Armbruster
Eric Blake writes: > On 06/15/2016 02:41 PM, Markus Armbruster wrote: >> 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 cont

Re: [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-15 Thread Eric Blake
On 06/15/2016 02:41 PM, Markus Armbruster wrote: > 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 t

[Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access

2016-06-15 Thread Markus Armbruster
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. To help with tracking down the places that