Bug 1498059 - Allow 8-bit unsigned consts in XPIDL; , r=nika,froydnj

Differential Revision: https://phabricator.services.mozilla.com/D8593

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kyle Machulis 2018-11-06 00:05:35 +00:00
parent 5465ead390
commit 911d1c3784
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class Builtin(object):
builtinNames = [
Builtin('boolean', 'bool', 'bool'),
Builtin('void', 'void', 'libc::c_void'),
Builtin('octet', 'uint8_t', 'libc::uint8_t'),
Builtin('octet', 'uint8_t', 'libc::uint8_t', False, True),
Builtin('short', 'int16_t', 'libc::int16_t', True, True),
Builtin('long', 'int32_t', 'libc::int32_t', True, True),
Builtin('long long', 'int64_t', 'libc::int64_t', True, False),

View File

@ -361,7 +361,7 @@ def link_to_cpp(interfaces, fd):
def lower_const(const, ifacename):
assert const['type']['tag'] in \
['TD_INT16', 'TD_INT32', 'TD_UINT16', 'TD_UINT32']
['TD_INT16', 'TD_INT32', 'TD_UINT8', 'TD_UINT16', 'TD_UINT32']
is_signed = const['type']['tag'] in ['TD_INT16', 'TD_INT32']
# Constants are always either signed or unsigned 16 or 32 bit integers,