mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Consistent generated code: prefer visitor 'v'
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is one patch of a series to clean up these differences. This patch names the local visitor variable 'v' rather than 'm'. Related objects, such as 'QapiDeallocVisitor', are also named by their initials instead of an unrelated leading m. No change in semantics to the generated code. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1443565276-4535-12-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
2a0f50e8d9
commit
f8b7f1a8ea
6 changed files with 109 additions and 109 deletions
|
@ -188,17 +188,17 @@ def gen_type_cleanup(name):
|
|||
|
||||
void qapi_free_%(c_name)s(%(c_name)s *obj)
|
||||
{
|
||||
QapiDeallocVisitor *md;
|
||||
QapiDeallocVisitor *qdv;
|
||||
Visitor *v;
|
||||
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
|
||||
md = qapi_dealloc_visitor_new();
|
||||
v = qapi_dealloc_get_visitor(md);
|
||||
qdv = qapi_dealloc_visitor_new();
|
||||
v = qapi_dealloc_get_visitor(qdv);
|
||||
visit_type_%(c_name)s(v, &obj, NULL, NULL);
|
||||
qapi_dealloc_visitor_cleanup(md);
|
||||
qapi_dealloc_visitor_cleanup(qdv);
|
||||
}
|
||||
''',
|
||||
c_name=c_name(name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue