On 02/28/2018 12:08 PM, Max Reitz wrote:
+ options = qobject_to(options_obj, QDict);
Bikeshedding - would it read any easier as:
options = qobject_to(QDict, options_obj);
So at this point, I'm 70:30 in favor of doing the rename to have
qobject_to(type, obj) for consistency with
On 2018-02-27 15:47, Eric Blake wrote:
> On 02/26/2018 06:01 AM, Max Reitz wrote:
>
+++ b/block.c
@@ -1457,7 +1457,7 @@ static QDict *parse_json_filename(const char
*filename, Error **errp)
return NULL;
}
- options =
On 02/26/2018 06:01 AM, Max Reitz wrote:
+++ b/block.c
@@ -1457,7 +1457,7 @@ static QDict *parse_json_filename(const char
*filename, Error **errp)
return NULL;
}
- options = qobject_to_qdict(options_obj);
+ options = qobject_to(options_obj, QDict);
Bikeshedding -
On 2018-02-24 22:04, Eric Blake wrote:
> On 02/24/2018 09:40 AM, Max Reitz wrote:
>> This patch was generated using the following Coccinelle script:
>>
>
>> and a bit of manual fix-up for overly long lines and three places in
>> tests/check-qjson.c that Coccinelle did not find.
>>
>>
On 02/24/2018 09:40 AM, Max Reitz wrote:
This patch was generated using the following Coccinelle script:
and a bit of manual fix-up for overly long lines and three places in
tests/check-qjson.c that Coccinelle did not find.
Signed-off-by: Max Reitz
Reviewed-by: Alberto
This patch was generated using the following Coccinelle script:
@@
expression Obj;
@@
(
- qobject_to_qnum(Obj)
+ qobject_to(Obj, QNum)
|
- qobject_to_qstring(Obj)
+ qobject_to(Obj, QString)
|
- qobject_to_qdict(Obj)
+ qobject_to(Obj, QDict)
|
- qobject_to_qlist(Obj)
+ qobject_to(Obj, QList)
|
-