@@ -58,7 +58,6 @@ struct Visitor
/* visit_type_size() falls back to (*type_uint64)() if type_size is unset */
void (*type_size)(Visitor *v, uint64_t *obj, const char *name, Error **errp);
bool (*start_union)(Visitor *v, bool data_present, Error **errp);
- void (*end_union)(Visitor *v, bool data_present, Error **errp);
};
void input_type_enum(Visitor *v, int *obj, const char * const strings[],
@@ -70,6 +70,5 @@ void visit_type_str(Visitor *v, char **obj, const char *name, Error **errp);
void visit_type_number(Visitor *v, double *obj, const char *name, Error **errp);
void visit_type_any(Visitor *v, QObject **obj, const char *name, Error **errp);
bool visit_start_union(Visitor *v, bool data_present, Error **errp);
-void visit_end_union(Visitor *v, bool data_present, Error **errp);
#endif
@@ -1,6 +1,7 @@
/*
* Core Definitions for QAPI Visitor Classes
*
+ * Copyright (C) 2012-2016 Red Hat, Inc.
* Copyright IBM, Corp. 2011
*
* Authors:
@@ -67,13 +68,6 @@ bool visit_start_union(Visitor *v, bool data_present, Error **errp)
return true;
}
-void visit_end_union(Visitor *v, bool data_present, Error **errp)
-{
- if (v->end_union) {
- v->end_union(v, data_present, errp);
- }
-}
-
bool visit_optional(Visitor *v, bool *present, const char *name)
{
if (v->optional) {
@@ -320,11 +320,6 @@ void visit_type_%(c_name)s(Visitor *v, %(c_name)s **obj, const char *name, Error
out_obj:
error_propagate(errp, err);
err = NULL;
- if (*obj) {
- visit_end_union(v, !!(*obj)->u.data, &err);
- }
- error_propagate(errp, err);
- err = NULL;
visit_end_struct(v, &err);
out:
error_propagate(errp, err);