зеркало из https://github.com/mozilla/pjs.git
Fix errors with (and add tests for) unsigned long constants on solaris.
Not part of the build (and neither was the last checkin - sorry)
This commit is contained in:
Родитель
6ac34c924f
Коммит
4353745624
|
@ -115,7 +115,7 @@ PyObject *PyObject_FromXPTConstant( const XPTConstDescriptor *c)
|
|||
v = PyInt_FromLong( c->value.ui16 );
|
||||
break;
|
||||
case TD_UINT32:
|
||||
v = PyInt_FromLong( c->value.ui8 );
|
||||
v = PyInt_FromLong( c->value.ui32 );
|
||||
break;
|
||||
case TD_UINT64:
|
||||
v = PyLong_FromUnsignedLongLong(c->value.ui64);
|
||||
|
|
|
@ -31,7 +31,8 @@ interface nsIPythonTestInterface : nsISupports
|
|||
const long Two = 2;
|
||||
const long MinusOne = -1;
|
||||
const long BigLong = 0x7FFFFFFF;
|
||||
const long BigULong = 0xFFFFFFFF;
|
||||
const long BiggerLong = 0xFFFFFFFF;
|
||||
const unsigned long BigULong = 0xFFFFFFFF;
|
||||
|
||||
// Declare every type supported as an attribute.
|
||||
attribute boolean boolean_value; // PRBool
|
||||
|
|
|
@ -285,6 +285,7 @@ def test_base_interface(c):
|
|||
test_constant(c, "Two", 2)
|
||||
test_constant(c, "MinusOne", -1)
|
||||
test_constant(c, "BigLong", 0x7FFFFFFF)
|
||||
test_constant(c, "BiggerLong", 0xFFFFFFFF)
|
||||
test_constant(c, "BigULong", 0xFFFFFFFF)
|
||||
# Test the components.Interfaces semantics
|
||||
i = xpcom.components.interfaces.nsIPythonTestInterface
|
||||
|
|
Загрузка…
Ссылка в новой задаче