]> xenbits.xensource.com Git - qemu-xen-4.6-testing.git/commitdiff
qapi: allow a 'gen' key to suppress code generation
authorAnthony Liguori <aliguori@us.ibm.com>
Mon, 12 Dec 2011 20:29:33 +0000 (14:29 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 15 Dec 2011 15:20:48 +0000 (09:20 -0600)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scripts/qapi-commands.py
scripts/qapi-types.py

index f7def1666273004cf914e31972c3666044126266..54d1f5d6599bc318446071d136a24b8914adb429 100644 (file)
@@ -405,6 +405,7 @@ except os.error, e:
 
 exprs = parse_schema(sys.stdin)
 commands = filter(lambda expr: expr.has_key('command'), exprs)
+commands = filter(lambda expr: not expr.has_key('gen'), commands)
 
 if dispatch_type == "sync":
     fdecl = open(h_file, 'w')
index f64d84c39ea7ae7b6f5f60ef997e0a7ae9b9cc5f..267cb49b1382181edda3e82c1213e7b51c03c83a 100644 (file)
@@ -238,6 +238,7 @@ fdecl.write(mcgen('''
                   guard=guardname(h_file)))
 
 exprs = parse_schema(sys.stdin)
+exprs = filter(lambda expr: not expr.has_key('gen'), exprs)
 
 for expr in exprs:
     ret = "\n"