Constify all opaque Property pointers

Via sed "s/  Property [*]/  const Property */".

The opaque pointers passed to ObjectProperty callbacks are
the last instances of non-const Property pointers in the tree.
For the most part, these callbacks only use object_field_prop_ptr,
which now takes a const pointer itself.

This logically should have accompanied d36f165d95 which
allowed const Property to be registered.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Lei Yang <leiyang@redhat.com>
Link: https://lore.kernel.org/r/20241218134251.4724-25-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Richard Henderson 2024-12-18 07:42:51 -06:00 committed by Paolo Bonzini
parent 857c4a8a33
commit b1987a2547
9 changed files with 76 additions and 76 deletions

View file

@ -46,7 +46,7 @@ static void get_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
Error **errp)
{
Property *prop = opaque;
const Property *prop = opaque;
TPMBackend *s, **be = object_field_prop_ptr(obj, prop);
char *str;
@ -66,7 +66,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
static void release_tpm(Object *obj, const char *name, void *opaque)
{
Property *prop = opaque;
const Property *prop = opaque;
TPMBackend **be = object_field_prop_ptr(obj, prop);
if (*be) {