On 21/03/2018 15:01, Eric Blake wrote:
>>
>
> Interesting. If we do this, we should also simplify qobject_to() from
> its current:
>
> #define qobject_to(type, obj) ({ \
> QObject *_tmp = qobject_check_type(obj, glue(QTYPE_CAST_TO_, type)); \
> _tmp ? container_of(_tmp, type, base) : (type *)NULL; })
>
> to the simpler:
>
> #define qobject_to(type, obj) \
> ((type *)qobject_check_type(obj, glue(QTYPE_CAST_TO_, type)))Yes, indeed! Paolo
