A recent patch submission was about to use qobject_decref(QOBJECT(E)),
even though we already have QDECREF(E) for that purpose. While our
tree is currently free from the longhand form, we might as well update
$ git grep 'object_unref(OBJECT(' | wc -l
our coccinelle script to catch any future relapses.
sadly, coccinelle is unabarebly slow on my machine, not easy to grasp, and thereby fails to catch a lot of cases.. I am looking at alternative from clang tools/lib, by curiosity.
Signed-off-by: Eric Blake <address@hidden>
scripts/coccinelle/qobject.cocci | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/coccinelle/qobject.cocci b/scripts/coccinelle/qobject.cocci
index 97703a4..656dc3e 100644
@@ -3,6 +3,12 @@
_expression_ Obj, Key, E;
- qdict_put_obj(Obj, Key, QOBJECT(E));
+ qdict_put(Obj, Key, E);