You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/10/28 18:19:07 UTC

svn commit: r708615 - in /incubator/qpid/trunk/qpid/python: qpid/codec010.py tests/codec010.py

Author: rhs
Date: Tue Oct 28 10:19:07 2008
New Revision: 708615

URL: http://svn.apache.org/viewvc?rev=708615&view=rev
Log:
fixed a bug in int16 codec

Modified:
    incubator/qpid/trunk/qpid/python/qpid/codec010.py
    incubator/qpid/trunk/qpid/python/tests/codec010.py

Modified: incubator/qpid/trunk/qpid/python/qpid/codec010.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/codec010.py?rev=708615&r1=708614&r2=708615&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/codec010.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/codec010.py Tue Oct 28 10:19:07 2008
@@ -68,7 +68,7 @@
   def read_int16(self):
     return self.unpack("!h")
   def write_int16(self, n):
-    return self.unpack("!h", n)
+    self.pack("!h", n)
 
 
   def read_uint32(self):

Modified: incubator/qpid/trunk/qpid/python/tests/codec010.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests/codec010.py?rev=708615&r1=708614&r2=708615&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests/codec010.py (original)
+++ incubator/qpid/trunk/qpid/python/tests/codec010.py Tue Oct 28 10:19:07 2008
@@ -86,3 +86,7 @@
 
   def testArrayNone(self):
     self.check("array", None)
+
+  def testInt16(self):
+    self.check("int16", 3)
+    self.check("int16", -3)