qapi: generate C types for fixed-width integers

(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>
This commit is contained in:
Laszlo Ersek 2012-07-17 16:17:06 +02:00 committed by Stefan Hajnoczi
parent d98150f052
commit c46f18ce2b
1 changed files with 4 additions and 0 deletions

View 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':