THRIFT-3612 Add Python C extension for compact protocol
Client: Python
Patch: Nobuaki Sukegawa
This closes #844
diff --git a/lib/py/src/protocol/TProtocol.py b/lib/py/src/protocol/TProtocol.py
index ed6938b..f29c58d 100644
--- a/lib/py/src/protocol/TProtocol.py
+++ b/lib/py/src/protocol/TProtocol.py
@@ -48,6 +48,8 @@
def __init__(self, trans):
self.trans = trans
+ self._fast_decode = None
+ self._fast_encode = None
@staticmethod
def _check_length(limit, length):
@@ -276,7 +278,7 @@
yield read()
def readFieldByTType(self, ttype, spec):
- return self._read_by_ttype(ttype, spec, spec).next()
+ return next(self._read_by_ttype(ttype, spec, spec))
def readContainerList(self, spec):
ttype, tspec, is_immutable = spec
@@ -394,7 +396,7 @@
yield write(v)
def writeFieldByTType(self, ttype, val, spec):
- self._write_by_ttype(ttype, [val], spec, spec).next()
+ next(self._write_by_ttype(ttype, [val], spec, spec))
def checkIntegerLimits(i, bits):