diff --git a/qemu/include/qom/object.h b/qemu/include/qom/object.h index bb915186..b7d452e8 100644 --- a/qemu/include/qom/object.h +++ b/qemu/include/qom/object.h @@ -651,7 +651,7 @@ ObjectClass *object_get_class(Object *obj); * * Returns: The QOM typename of @obj. */ -const char *object_get_typename(Object *obj); +const char *object_get_typename(const Object *obj); /** * type_register_static: @@ -1165,7 +1165,7 @@ typedef enum { * callback function. It allows the link property to be set and never returns * an error. */ -void object_property_allow_set_link(Object *, const char *, +void object_property_allow_set_link(const Object *, const char *, Object *, Error **); /** @@ -1198,7 +1198,7 @@ void object_property_allow_set_link(Object *, const char *, */ void object_property_add_link(struct uc_struct *uc, Object *obj, const char *name, const char *type, Object **child, - void (*check)(Object *obj, const char *name, + void (*check)(const Object *obj, const char *name, Object *val, Error **errp), ObjectPropertyLinkFlags flags, Error **errp); diff --git a/qemu/qom/object.c b/qemu/qom/object.c index 87810218..9e16e29e 100644 --- a/qemu/qom/object.c +++ b/qemu/qom/object.c @@ -616,7 +616,7 @@ out: return ret; } -const char *object_get_typename(Object *obj) +const char *object_get_typename(const Object *obj) { return obj->class->type->name; } @@ -1211,7 +1211,7 @@ out: g_free(type); } -void object_property_allow_set_link(Object *obj, const char *name, +void object_property_allow_set_link(const Object *obj, const char *name, Object *val, Error **errp) { /* Allow the link to be set, always */ @@ -1219,7 +1219,7 @@ void object_property_allow_set_link(Object *obj, const char *name, typedef struct { Object **child; - void (*check)(Object *, const char *, Object *, Error **); + void (*check)(const Object *, const char *, Object *, Error **); ObjectPropertyLinkFlags flags; } LinkProperty; @@ -1337,7 +1337,7 @@ static void object_release_link_property(struct uc_struct *uc, Object *obj, cons void object_property_add_link(struct uc_struct *uc, Object *obj, const char *name, const char *type, Object **child, - void (*check)(Object *, const char *, + void (*check)(const Object *, const char *, Object *, Error **), ObjectPropertyLinkFlags flags, Error **errp)