Il mar 22 ott 2024, 23:43 Philippe Mathieu-Daudé <phi...@linaro.org> ha
scritto:

> On 22/10/24 02:23, Paolo Bonzini wrote:
> > At least keeping the const
> > within qdev properties makes things "safer" within that realm.
>
> Since it is only within qdev-properties.c, it is indeed reasonable to
> accept. Maybe make it explicit via a well-named macro to do the cast?
>
>    /* NON_CONST_PROP: Specific macro to this file because ... */
>    #define NON_CONST_PROP(prop) (Property *)(prop)
>

The name of the macro suggests the opposite, i.e. that you'd use it to cast
const void* to Property* in the callbacks. I would leave it as it is.

Paolo

>
> Regards,
>
> Phil.
>
>

Reply via email to