BiggerLong definition in py_test_component.idl is wrong

RESOLVED FIXED

Status

Other Applications
PyXPCOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 591435 [details] [diff] [review]
Patch

const long BiggerLong = 0xFFFFFFFF;

0xFFFFFFFF is 4294967295, which is not in the range of supported values for a (signed) long.

This leads to the following build error:
/usr/lib/xulrunner-devel-9.0/sdk/bin/typelib.py --cachedir=/usr/lib/xulrunner-devel-9.0/sdk/bin -I../../../../xpcom/test/test_component -I../../../dist/idl -I/usr/lib/xulrunner-devel-9.0/idl ../../../../xpcom/test/test_component/py_test_component.idl -d .deps/py_test_component.xpt.pp -o _xpidlgen/py_test_component.xpt
Traceback (most recent call last):
  File "../../../../config/pythonpath.py", line 40, in <module>
    execfile(script, {'__name__': '__main__', '__file__': script})
  File "/usr/lib/xulrunner-devel-9.0/sdk/bin/typelib.py", line 316, in <module>
    write_typelib(idl, outfd, file)
  File "/usr/lib/xulrunner-devel-9.0/sdk/bin/typelib.py", line 272, in write_typelib
    typelib.writefd(fd)
  File "/usr/lib/xulrunner-devel-9.0/sdk/bin/xpt.py", line 1138, in writefd
    i.write(self, fd, data_pool_offset)
  File "/usr/lib/xulrunner-devel-9.0/sdk/bin/xpt.py", line 966, in write
    c.write(typelib, file)
  File "/usr/lib/xulrunner-devel-9.0/sdk/bin/xpt.py", line 817, in write
    file.write(struct.pack(tt, self.value))
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
Attachment #591435 - Flags: review?(toddw)

Comment 1

6 years ago
Comment on attachment 591435 [details] [diff] [review]
Patch

Committed as pyxpcom change:
http://hg.mozilla.org/pyxpcom/rev/3856dbd68d5d
Attachment #591435 - Flags: review?(toddw) → review+

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.