https://bugzilla.redhat.com/show_bug.cgi?id=1222795
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
generator.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/generator.py b/generator.py
index 676243c..2fc838c 100755
--- a/generator.py
+++ b/generator.py
@@ -10,6 +10,7 @@ enums = {} # { enumType: { enumConstant: enumValue } }
lxc_enums = {} # { enumType: { enumConstant: enumValue } }
qemu_enums = {} # { enumType: { enumConstant: enumValue } }
event_ids = []
+params = [] # [ (parameName, paramValue)... ]
import os
import sys
@@ -134,6 +135,9 @@ class docParser(xml.sax.handler.ContentHandler):
lxc_enum(attrs['type'],attrs['name'],attrs['value'])
elif attrs['file'] == "libvirt-qemu":
qemu_enum(attrs['type'],attrs['name'],attrs['value'])
+ elif tag == "macro":
+ if "string" in attrs:
+ params.append((attrs['name'], attrs['string']))
def end(self, tag):
if debug:
@@ -1881,6 +1885,10 @@ def buildWrappers(module):
classes.write("%s = %s\n" % (name,value))
classes.write("\n")
+ classes.write("# typed parameter names\n")
+ for name, value in params:
+ classes.write("%s = \"%s\"\n" % (name, value))
+
classes.close()
def qemuBuildWrappers(module):
--
2.4.2