bug 780203 - add [u]intn_t types to xpidl r=khuey
authorTrevor Saunders <trev.saunders@gmail.com>
Fri, 27 Jul 2012 19:58:26 -0400
changeset 107750 4bdc7b03597ed4a438ef3fe1e4d50f53f8e0fc3a
parent 107749 41755706db39a15dd771a24744c3bed03555e3f1
child 107751 d1ed1834ee750060f465b9d49068e759feb8867b
push id214
push userakeybl@mozilla.com
push dateWed, 14 Nov 2012 20:38:59 +0000
treeherdermozilla-release@c8b08ec8e1aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 780203 - add [u]intn_t types to xpidl r=khuey
--- a/xpcom/idl-parser/typelib.py
+++ b/xpcom/idl-parser/typelib.py
@@ -13,16 +13,23 @@ import xpidl, xpt
 # A map of xpidl.py types to xpt.py types
 TypeMap = {
     # nsresult is not strictly an xpidl.py type, but it's useful here
     'nsresult':           xpt.Type.Tags.uint32,
     # builtins
     'boolean':            xpt.Type.Tags.boolean,
     'void':               xpt.Type.Tags.void,
+    'int16_t':              xpt.Type.Tags.int16,
+    'int32_t':               xpt.Type.Tags.int32,
+    'int64_t':          xpt.Type.Tags.int64,
+    'uint8_t':              xpt.Type.Tags.uint8,
+    'uint16_t':     xpt.Type.Tags.uint16,
+    'uint32_t':      xpt.Type.Tags.uint32,
+    'uint64_t': xpt.Type.Tags.uint64,
     'octet':              xpt.Type.Tags.uint8,
     'short':              xpt.Type.Tags.int16,
     'long':               xpt.Type.Tags.int32,
     'long long':          xpt.Type.Tags.int64,
     'unsigned short':     xpt.Type.Tags.uint16,
     'unsigned long':      xpt.Type.Tags.uint32,
     'unsigned long long': xpt.Type.Tags.uint64,
     'float':              xpt.Type.Tags.float,
--- a/xpcom/idl-parser/xpidl.py
+++ b/xpcom/idl-parser/xpidl.py
@@ -115,16 +115,23 @@ class Builtin(object):
             const = ''
         return "%s%s %s" % (const, self.nativename,
                             calltype != 'in' and '*' or '')
 builtinNames = [
     Builtin('boolean', 'bool'),
     Builtin('void', 'void'),
+    Builtin('int16_t', 'int16_t', True, True),
+    Builtin('int32_t', 'int32_t', True, True),
+    Builtin('int64_t', 'int64_t', True, False),
+    Builtin('uint8_t', 'uint8_t'),
+    Builtin('uint16_t', 'uint16_t', False, True),
+    Builtin('uint32_t', 'uint32_t', False, True),
+    Builtin('uint64_t', 'uint64_t', False, False),
     Builtin('octet', 'PRUint8'),
     Builtin('short', 'PRInt16', True, True),
     Builtin('long', 'PRInt32', True, True),
     Builtin('long long', 'PRInt64', True, False),
     Builtin('unsigned short', 'PRUint16', False, True),
     Builtin('unsigned long', 'PRUint32', False, True),
     Builtin('unsigned long long', 'PRUint64', False, False),
     Builtin('float', 'float', True, False),