qom: Use typedef for Visitor
No need to repeat 'struct Visitor' when we already have it in typedefs.h. Omitting the redundant 'struct' also makes a later patch easier to search for all object property callbacks that are associated with a Visitor. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1454075341-13658-18-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
395a233f7c
commit
4fa45492c3
@ -363,8 +363,8 @@ static void pci_edu_uninit(PCIDevice *pdev)
|
||||
timer_del(&edu->dma_timer);
|
||||
}
|
||||
|
||||
static void edu_obj_uint64(Object *obj, struct Visitor *v, void *opaque,
|
||||
const char *name, Error **errp)
|
||||
static void edu_obj_uint64(Object *obj, Visitor *v, void *opaque,
|
||||
const char *name, Error **errp)
|
||||
{
|
||||
uint64_t *val = opaque;
|
||||
|
||||
|
@ -113,7 +113,7 @@ static void balloon_stats_poll_cb(void *opaque)
|
||||
s->stats_vq_elem = NULL;
|
||||
}
|
||||
|
||||
static void balloon_stats_get_all(Object *obj, struct Visitor *v,
|
||||
static void balloon_stats_get_all(Object *obj, Visitor *v,
|
||||
void *opaque, const char *name, Error **errp)
|
||||
{
|
||||
Error *err = NULL;
|
||||
@ -151,7 +151,7 @@ out:
|
||||
error_propagate(errp, err);
|
||||
}
|
||||
|
||||
static void balloon_stats_get_poll_interval(Object *obj, struct Visitor *v,
|
||||
static void balloon_stats_get_poll_interval(Object *obj, Visitor *v,
|
||||
void *opaque, const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
@ -159,7 +159,7 @@ static void balloon_stats_get_poll_interval(Object *obj, struct Visitor *v,
|
||||
visit_type_int(v, &s->stats_poll_interval, name, errp);
|
||||
}
|
||||
|
||||
static void balloon_stats_set_poll_interval(Object *obj, struct Visitor *v,
|
||||
static void balloon_stats_set_poll_interval(Object *obj, Visitor *v,
|
||||
void *opaque, const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
|
@ -18,10 +18,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "qemu/queue.h"
|
||||
#include "qemu/typedefs.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
struct Visitor;
|
||||
|
||||
struct TypeImpl;
|
||||
typedef struct TypeImpl *Type;
|
||||
|
||||
@ -298,7 +297,7 @@ typedef struct InterfaceInfo InterfaceInfo;
|
||||
* Called when trying to get/set a property.
|
||||
*/
|
||||
typedef void (ObjectPropertyAccessor)(Object *obj,
|
||||
struct Visitor *v,
|
||||
Visitor *v,
|
||||
void *opaque,
|
||||
const char *name,
|
||||
Error **errp);
|
||||
@ -1025,7 +1024,7 @@ void object_unparent(Object *obj);
|
||||
*
|
||||
* Reads a property from a object.
|
||||
*/
|
||||
void object_property_get(Object *obj, struct Visitor *v, const char *name,
|
||||
void object_property_get(Object *obj, Visitor *v, const char *name,
|
||||
Error **errp);
|
||||
|
||||
/**
|
||||
@ -1161,7 +1160,7 @@ void object_property_get_uint16List(Object *obj, const char *name,
|
||||
*
|
||||
* Writes a property to a object.
|
||||
*/
|
||||
void object_property_set(Object *obj, struct Visitor *v, const char *name,
|
||||
void object_property_set(Object *obj, Visitor *v, const char *name,
|
||||
Error **errp);
|
||||
|
||||
/**
|
||||
|
@ -2185,7 +2185,7 @@ typedef struct {
|
||||
char *target_name;
|
||||
} AliasProperty;
|
||||
|
||||
static void property_get_alias(Object *obj, struct Visitor *v, void *opaque,
|
||||
static void property_get_alias(Object *obj, Visitor *v, void *opaque,
|
||||
const char *name, Error **errp)
|
||||
{
|
||||
AliasProperty *prop = opaque;
|
||||
@ -2193,7 +2193,7 @@ static void property_get_alias(Object *obj, struct Visitor *v, void *opaque,
|
||||
object_property_get(prop->target_obj, v, prop->target_name, errp);
|
||||
}
|
||||
|
||||
static void property_set_alias(Object *obj, struct Visitor *v, void *opaque,
|
||||
static void property_set_alias(Object *obj, Visitor *v, void *opaque,
|
||||
const char *name, Error **errp)
|
||||
{
|
||||
AliasProperty *prop = opaque;
|
||||
|
@ -2945,7 +2945,7 @@ typedef struct BitProperty {
|
||||
} BitProperty;
|
||||
|
||||
static void x86_cpu_get_bit_prop(Object *obj,
|
||||
struct Visitor *v,
|
||||
Visitor *v,
|
||||
void *opaque,
|
||||
const char *name,
|
||||
Error **errp)
|
||||
@ -2956,7 +2956,7 @@ static void x86_cpu_get_bit_prop(Object *obj,
|
||||
}
|
||||
|
||||
static void x86_cpu_set_bit_prop(Object *obj,
|
||||
struct Visitor *v,
|
||||
Visitor *v,
|
||||
void *opaque,
|
||||
const char *name,
|
||||
Error **errp)
|
||||
|
Loading…
Reference in New Issue
Block a user