qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 05/15] qapi: Use IGNORE_ERRORS instead of NULL on gene


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC 05/15] qapi: Use IGNORE_ERRORS instead of NULL on generated code
Date: Tue, 13 Jun 2017 13:53:03 -0300

Signed-off-by: Eduardo Habkost <address@hidden>
---
 scripts/qapi-commands.py | 6 +++---
 scripts/qapi-types.py    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 1943de4852..afa58915ba 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -75,7 +75,7 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s ret_in, 
QObject **ret_out,
     error_propagate(errp, err);
     visit_free(v);
     v = qapi_dealloc_visitor_new();
-    visit_type_%(c_name)s(v, "unused", &ret_in, NULL);
+    visit_type_%(c_name)s(v, "unused", &ret_in, IGNORE_ERRORS);
     visit_free(v);
 }
 ''',
@@ -162,7 +162,7 @@ out:
 ''')
 
     if have_args:
-        visit_members = ('visit_type_%s_members(v, &arg, NULL);'
+        visit_members = ('visit_type_%s_members(v, &arg, IGNORE_ERRORS);'
                          % arg_type.c_name())
     else:
         visit_members = ''
@@ -173,7 +173,7 @@ out:
 
     ret += mcgen('''
     v = qapi_dealloc_visitor_new();
-    visit_start_struct(v, NULL, NULL, 0, NULL);
+    visit_start_struct(v, NULL, NULL, 0, IGNORE_ERRORS);
     %(visit_members)s
     visit_end_struct(v, NULL);
     visit_free(v);
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 814ac672be..ab78fa56e9 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -157,7 +157,7 @@ void qapi_free_%(c_name)s(%(c_name)s *obj)
     }
 
     v = qapi_dealloc_visitor_new();
-    visit_type_%(c_name)s(v, NULL, &obj, NULL);
+    visit_type_%(c_name)s(v, NULL, &obj, IGNORE_ERRORS);
     visit_free(v);
 }
 ''',
-- 
2.11.0.259.g40922b1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]