THRIFT-1639 Java/Python: Serialization/Deserialization of double type using CompactProtocol
Patch: Patrick Lawson
diff --git a/lib/py/src/protocol/TCompactProtocol.py b/lib/py/src/protocol/TCompactProtocol.py
index cdec607..c34edb8 100644
--- a/lib/py/src/protocol/TCompactProtocol.py
+++ b/lib/py/src/protocol/TCompactProtocol.py
@@ -250,7 +250,7 @@
@writer
def writeDouble(self, dub):
- self.trans.write(pack('!d', dub))
+ self.trans.write(pack('<d', dub))
def __writeString(self, s):
self.__writeSize(len(s))
@@ -383,7 +383,7 @@
@reader
def readDouble(self):
buff = self.trans.readAll(8)
- val, = unpack('!d', buff)
+ val, = unpack('<d', buff)
return val
def __readString(self):