On Mon, 9 Jan 2023 at 23:43, Bernhard Beschow wrote:
>
>
>
> Am 9. Januar 2023 12:08:16 UTC schrieb "Philippe Mathieu-Daudé"
> :
> >The point of a getter() function is to not expose the structure
> >internal fields. Otherwise callers could simply access the
> >PFlashCFI01::mem field.
"modern" QO
Am 9. Januar 2023 12:08:16 UTC schrieb "Philippe Mathieu-Daudé"
:
>The point of a getter() function is to not expose the structure
>internal fields. Otherwise callers could simply access the
>PFlashCFI01::mem field.
The getter also works with a typedef which doesn't need the structure exposed.
The point of a getter() function is to not expose the structure
internal fields. Otherwise callers could simply access the
PFlashCFI01::mem field.
Have the callers pass a DeviceState* argument. The QOM
type check is done in the callee.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Bin Meng