]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qapi: generate C types for fixed-width integers
authorLaszlo Ersek <lersek@redhat.com>
Tue, 17 Jul 2012 14:17:06 +0000 (16:17 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 23 Jul 2012 10:55:17 +0000 (11:55 +0100)
(Long line folded using parens:
<http://www.python.org/dev/peps/pep-0008/#maximum-line-length>.)

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
scripts/qapi.py

index e06233666b0f5de36ed6886d825af28f2e3fe035..1292476a7d70a7ff000e9d159958b3f28a9fdfd4 100644 (file)
@@ -159,6 +159,10 @@ def c_type(name):
         return 'char *'
     elif name == 'int':
         return 'int64_t'
+    elif (name == 'int8' or name == 'int16' or name == 'int32' or
+          name == 'int64' or name == 'uint8' or name == 'uint16' or
+          name == 'uint32' or name == 'uint64'):
+        return name + '_t'
     elif name == 'bool':
         return 'bool'
     elif name == 'number':