qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.10 03/10] qapi: Introduce a first class 'n


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH for-2.10 03/10] qapi: Introduce a first class 'null' type
Date: Tue, 18 Jul 2017 17:20:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 07/18/2017 08:41 AM, Markus Armbruster wrote:
>> I expect the 'null' type to be useful mostly for members of alternate
>> types.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>
>> +++ b/include/qapi/qmp/qobject.h
>> @@ -93,9 +93,9 @@ static inline QType qobject_type(const QObject *obj)
>>      return obj->type;
>>  }
>>  
>> -typedef struct QNull {
>> +struct QNull {
>
> This line was just added...
>
>>      QObject base;
>> -} QNull;
>> +};
>>  
>>  extern QNull qnull_;
>>  
>> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
>> index 2706aab..ba69bd8 100644
>> --- a/include/qemu/typedefs.h
>> +++ b/include/qemu/typedefs.h
>> @@ -87,6 +87,7 @@ typedef struct QEMUSGList QEMUSGList;
>>  typedef struct QEMUTimer QEMUTimer;
>>  typedef struct QEMUTimerListGroup QEMUTimerListGroup;
>>  typedef struct QObject QObject;
>> +typedef struct QNull QNull;
>
> ...is it worth hoisting this typedef into 2/10 for less churn?

Less code churn, but more commit message explaining, unless we simply
sneak it into typedefs.h without justification.

> Reviewed-by: Eric Blake <address@hidden>

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]