From 20db0111df9b2f44d36ee6dca00c08ae34b775d3 Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Fri, 8 Aug 2003 00:51:40 +0000 Subject: [PATCH] Fix errors with (and add tests for) unsigned long constants on solaris. Not part of the build (and neither was the last checkin - sorry) git-svn-id: svn://10.0.0.236/trunk@145716 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/python/xpcom/src/Pyxpt_info.cpp | 2 +- .../python/xpcom/test/test_component/py_test_component.idl | 3 ++- mozilla/extensions/python/xpcom/test/test_test_component.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/extensions/python/xpcom/src/Pyxpt_info.cpp b/mozilla/extensions/python/xpcom/src/Pyxpt_info.cpp index 21e25082315..6015a7af32f 100644 --- a/mozilla/extensions/python/xpcom/src/Pyxpt_info.cpp +++ b/mozilla/extensions/python/xpcom/src/Pyxpt_info.cpp @@ -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); diff --git a/mozilla/extensions/python/xpcom/test/test_component/py_test_component.idl b/mozilla/extensions/python/xpcom/test/test_component/py_test_component.idl index 34a08520aa1..a0d99e9a4bb 100644 --- a/mozilla/extensions/python/xpcom/test/test_component/py_test_component.idl +++ b/mozilla/extensions/python/xpcom/test/test_component/py_test_component.idl @@ -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 diff --git a/mozilla/extensions/python/xpcom/test/test_test_component.py b/mozilla/extensions/python/xpcom/test/test_test_component.py index c56685b4ec4..6e18f4c3873 100644 --- a/mozilla/extensions/python/xpcom/test/test_test_component.py +++ b/mozilla/extensions/python/xpcom/test/test_test_component.py @@ -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