summaryrefslogtreecommitdiff
path: root/giscanner/ast.py
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-04-25 14:20:09 +0100
committerNeil Roberts <neil@linux.intel.com>2012-05-02 14:37:57 +0100
commit4db11376208b4662705d8b7a82ac12ba6fc1f745 (patch)
treefebb60a9d36c6c1ca7720f6841e9f1c89ecdf1ec /giscanner/ast.py
parentbe867f9658b64ee0a93f7730929b421e37b911f6 (diff)
downloadgobject-introspection-4db11376208b4662705d8b7a82ac12ba6fc1f745.tar.gz
Add the fixed width C99 types from stdint.h
C99 has standard types for fixed width signed and unsigned integers. This adds types to giscanner to map them to the glib equivalent types. stdint.h also has other types to specify specify sizes with at least a certain number of bits, the fastest type with at least some number of bits, a type big enough to store a pointer and a type containing the most number of bits. These don't map well to glib types so I have ignored them. https://bugzilla.gnome.org/show_bug.cgi?id=674796
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r--giscanner/ast.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index a78a9f1d..cab38070 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -265,6 +265,15 @@ type_names['void*'] = TYPE_ANY
type_names['void'] = TYPE_NONE
# Also alias the signed one here
type_names['signed long long'] = TYPE_LONG_LONG
+# C99 stdint exact width types
+type_names['int8_t'] = TYPE_INT8
+type_names['uint8_t'] = TYPE_UINT8
+type_names['int16_t'] = TYPE_INT16
+type_names['uint16_t'] = TYPE_UINT16
+type_names['int32_t'] = TYPE_INT32
+type_names['uint32_t'] = TYPE_UINT32
+type_names['int64_t'] = TYPE_INT64
+type_names['uint64_t'] = TYPE_UINT64
# A few additional GLib type aliases
type_names['guchar'] = TYPE_UINT8