Patchwork [02/29] qidl: qidl.h, mark common immutable types as q_immutable by default

login
register
mail settings
Submitter Michael Roth
Date Nov. 1, 2012, 1:04 p.m.
Message ID <1351775071-7644-3-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/196256/
State New
Headers show

Comments

Michael Roth - Nov. 1, 2012, 1:04 p.m.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qidl.h |    6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/qidl.h b/qidl.h
index 8d8dd7b..c80ccf7 100644
--- a/qidl.h
+++ b/qidl.h
@@ -42,6 +42,7 @@ 
 
 #define QIDL(...) QIDL(__VA_ARGS__)
 #define QIDL_START(name, ...) QIDL_START(name, ##__VA_ARGS__)
+#define QIDL_IMMUTABLE_TYPES(...) QIDL_IMMUTABLE_TYPES(__VA_ARGS__)
 
 #else
 
@@ -50,6 +51,7 @@ 
     QIDL_DATA_DECLARE(name) \
     extern QIDLData##name qidl_data_##name; \
     void visit_type_##name(Visitor *, struct name **, const char *, Error **);
+#define QIDL_IMMUTABLE_TYPES(...)
 #ifdef QIDL_ENABLED
 #define QIDL_START(name, ...) \
     QIDL_DATA_DECLARE(name) \
@@ -159,4 +161,8 @@ 
 #define QIDL_PROPERTIES(name) \
     qidl_data_##name.properties
 
+QIDL_IMMUTABLE_TYPES(Notifier, MemoryRegion, MemoryRegionIoeventfd, \
+                     DeviceState, BusState, DMAContext, qemu_irq, \
+                     SysBusDevice)
+
 #endif