Eric Blake writes:
> On 10/21/2015 07:34 AM, Markus Armbruster wrote:
>
>>
>> The least verbose naming convention for a conversion function I can
>> think of right now is TBase(), where T is the name of a type with a
>> base. Compare:
>>
>> foo((Parent *)child, blah)
>> foo(ChildBase(c
On 10/21/2015 07:34 AM, Markus Armbruster wrote:
>
> The least verbose naming convention for a conversion function I can
> think of right now is TBase(), where T is the name of a type with a
> base. Compare:
>
> foo((Parent *)child, blah)
> foo(ChildBase(child), blah)
>
> Tolerable? W
Eric Blake writes:
> On 10/21/2015 07:34 AM, Markus Armbruster wrote:
>
> @@ -218,9 +216,11 @@ static void channel_event(int event,
> SpiceChannelEventInfo *info)
> }
>
> if (info->flags & SPICE_CHANNEL_EVENT_FLAG_ADDR_EXT) {
> -add_addr_info(client->base
Eric Blake writes:
> On 10/20/2015 06:09 AM, Markus Armbruster wrote:
>> Eric Blake writes:
>>
>>> Rather than storing a base class as a pointer to a box, just
>>> store the fields of that base class in the same order, so that
>>> a child struct can be safely cast to its parent.
>
>
>
>>>
On 10/21/2015 07:34 AM, Markus Armbruster wrote:
@@ -218,9 +216,11 @@ static void channel_event(int event,
SpiceChannelEventInfo *info)
}
if (info->flags & SPICE_CHANNEL_EVENT_FLAG_ADDR_EXT) {
-add_addr_info(client->base, (struct sockaddr *)&info->pa
On 10/20/2015 06:09 AM, Markus Armbruster wrote:
> Eric Blake writes:
>
>> Rather than storing a base class as a pointer to a box, just
>> store the fields of that base class in the same order, so that
>> a child struct can be safely cast to its parent.
>> Compare to the earlier commit 1e6
Eric Blake writes:
> Rather than storing a base class as a pointer to a box, just
> store the fields of that base class in the same order, so that
> a child struct can be safely cast to its parent. This gives
> less malloc overhead, less pointer dereferencing, and even less
> generated code.
Lo
Rather than storing a base class as a pointer to a box, just
store the fields of that base class in the same order, so that
a child struct can be safely cast to its parent. This gives
less malloc overhead, less pointer dereferencing, and even less
generated code.
Without boxing, the corner case o