diff options
author | Eric Blake <eblake@redhat.com> | 2016-06-09 10:48:37 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-07-06 10:52:04 +0200 |
commit | 7a0525c7be6b38d32d586e3fd12e7377ded21faa (patch) | |
tree | 06f7dc1da296b1fea7357044989188c7059b585f /tests/test-visitor-serialization.c | |
parent | 09204eac9bb513e56992c00c75f32f9d4766256b (diff) |
string-input-visitor: Favor new visit_free() function
Now that we have a polymorphic visit_free(), we no longer need
string_input_visitor_cleanup(); which in turn means we no longer
need to return a subtype from string_input_visitor_new() nor a
public upcast function.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-7-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/test-visitor-serialization.c')
-rw-r--r-- | tests/test-visitor-serialization.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c index bcbfd2aeb7..c3c8634294 100644 --- a/tests/test-visitor-serialization.c +++ b/tests/test-visitor-serialization.c @@ -1056,7 +1056,7 @@ static void qmp_cleanup(void *datap) typedef struct StringSerializeData { char *string; StringOutputVisitor *sov; - StringInputVisitor *siv; + Visitor *siv; } StringSerializeData; static void string_serialize(void *native_in, void **datap, @@ -1076,7 +1076,7 @@ static void string_deserialize(void **native_out, void *datap, d->string = string_output_get_string(d->sov); d->siv = string_input_visitor_new(d->string); - visit(string_input_get_visitor(d->siv), native_out, errp); + visit(d->siv, native_out, errp); } static void string_cleanup(void *datap) @@ -1084,7 +1084,7 @@ static void string_cleanup(void *datap) StringSerializeData *d = datap; string_output_visitor_cleanup(d->sov); - string_input_visitor_cleanup(d->siv); + visit_free(d->siv); g_free(d->string); g_free(d); } |