summaryrefslogtreecommitdiff
path: root/python/qpid
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-03-25 18:22:55 +0000
committerRafael H. Schloming <rhs@apache.org>2009-03-25 18:22:55 +0000
commit2d716942ffd99eb04a723ceb43709305a2eb2244 (patch)
tree3ccf86d88435ac29a06a1ea2d48469535bf7768e /python/qpid
parentd84587631a8c6c95bc80bc7ce28dae69e07e6376 (diff)
downloadqpid-python-2d716942ffd99eb04a723ceb43709305a2eb2244.tar.gz
use longs for large hex constant literals, this avoids scary looking warnings on earlier versions of python
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@758389 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid')
-rw-r--r--python/qpid/datatypes.py6
-rw-r--r--python/qpid/management.py8
-rw-r--r--python/qpid/peer.py2
-rw-r--r--python/qpid/spec010.py2
-rw-r--r--python/qpid/testlib.py12
5 files changed, 15 insertions, 15 deletions
diff --git a/python/qpid/datatypes.py b/python/qpid/datatypes.py
index 532995e051..b2dcbe74ab 100644
--- a/python/qpid/datatypes.py
+++ b/python/qpid/datatypes.py
@@ -125,7 +125,7 @@ def serial(o):
class Serial:
def __init__(self, value):
- self.value = value & 0xFFFFFFFF
+ self.value = value & 0xFFFFFFFFL
def __hash__(self):
return hash(self.value)
@@ -136,8 +136,8 @@ class Serial:
other = serial(other)
- delta = (self.value - other.value) & 0xFFFFFFFF
- neg = delta & 0x80000000
+ delta = (self.value - other.value) & 0xFFFFFFFFL
+ neg = delta & 0x80000000L
mag = delta & 0x7FFFFFFF
if neg:
diff --git a/python/qpid/management.py b/python/qpid/management.py
index 477f3e8f2b..546e68ae8e 100644
--- a/python/qpid/management.py
+++ b/python/qpid/management.py
@@ -177,12 +177,12 @@ class managementChannel:
ssn.incoming ("rdest").listen (self.replyCb)
ssn.message_set_flow_mode (destination="tdest", flow_mode=1)
- ssn.message_flow (destination="tdest", unit=0, value=0xFFFFFFFF)
- ssn.message_flow (destination="tdest", unit=1, value=0xFFFFFFFF)
+ ssn.message_flow (destination="tdest", unit=0, value=0xFFFFFFFFL)
+ ssn.message_flow (destination="tdest", unit=1, value=0xFFFFFFFFL)
ssn.message_set_flow_mode (destination="rdest", flow_mode=1)
- ssn.message_flow (destination="rdest", unit=0, value=0xFFFFFFFF)
- ssn.message_flow (destination="rdest", unit=1, value=0xFFFFFFFF)
+ ssn.message_flow (destination="rdest", unit=0, value=0xFFFFFFFFL)
+ ssn.message_flow (destination="rdest", unit=1, value=0xFFFFFFFFL)
def setBrokerInfo (self, data):
self.brokerInfo = data
diff --git a/python/qpid/peer.py b/python/qpid/peer.py
index 648f32ceef..18d7848b8d 100644
--- a/python/qpid/peer.py
+++ b/python/qpid/peer.py
@@ -460,6 +460,6 @@ class IncomingCompletion:
#TODO: record and manage the ranges properly
range = [mark, mark]
if (self.mark == -1):#hack until wraparound is implemented
- self.channel.execution_complete(cumulative_execution_mark=0xFFFFFFFF, ranged_execution_set=range)
+ self.channel.execution_complete(cumulative_execution_mark=0xFFFFFFFFL, ranged_execution_set=range)
else:
self.channel.execution_complete(cumulative_execution_mark=self.mark, ranged_execution_set=range)
diff --git a/python/qpid/spec010.py b/python/qpid/spec010.py
index 13a64d7db6..eabc8e2983 100644
--- a/python/qpid/spec010.py
+++ b/python/qpid/spec010.py
@@ -484,7 +484,7 @@ class Spec(Node):
buffer: direct("vbin32"),
int: direct("int64"),
long: direct("int64"),
- float: direct("float"),
+ float: direct("double"),
None.__class__: direct("void"),
list: direct("list"),
tuple: direct("list"),
diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py
index 31f52169ae..7f5ac1fcd2 100644
--- a/python/qpid/testlib.py
+++ b/python/qpid/testlib.py
@@ -288,16 +288,16 @@ class TestBase(unittest.TestCase):
else: self.uniqueTag += 1
consumer_tag = "tag" + str(self.uniqueTag)
self.channel.message_subscribe(queue=queueName, destination=consumer_tag)
- self.channel.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFF)
- self.channel.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFF)
+ self.channel.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFFL)
+ self.channel.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFFL)
return self.client.queue(consumer_tag)
def subscribe(self, channel=None, **keys):
channel = channel or self.channel
consumer_tag = keys["destination"]
channel.message_subscribe(**keys)
- channel.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFF)
- channel.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFF)
+ channel.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFFL)
+ channel.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFFL)
def assertEmpty(self, queue):
"""Assert that the queue is empty"""
@@ -388,5 +388,5 @@ class TestBase010(unittest.TestCase):
session = session or self.session
consumer_tag = keys["destination"]
session.message_subscribe(**keys)
- session.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFF)
- session.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFF)
+ session.message_flow(destination=consumer_tag, unit=0, value=0xFFFFFFFFL)
+ session.message_flow(destination=consumer_tag, unit=1, value=0xFFFFFFFFL)