Exemplo n.º 1
0
 def write(self, oprot):
   if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and TBinaryProtocol is not None:
     oprot.trans.write(TBinaryProtocol.encode_binary(self, (self.__class__, self.thrift_spec)))
     return
   oprot.writeStructBegin('add_result')
   if self.success is not None:
     oprot.writeFieldBegin('success', TType.I32, 0)
     oprot.writeI32(self.success)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
Exemplo n.º 2
0
 def write(self, oprot):
   if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and TBinaryProtocol is not None:
     oprot.trans.write(TBinaryProtocol.encode_binary(self, (self.__class__, self.thrift_spec)))
     return
   oprot.writeStructBegin('add_args')
   if self.a is not None:
     oprot.writeFieldBegin('a', TType.I32, 1)
     oprot.writeI32(self.a)
     oprot.writeFieldEnd()
   if self.b is not None:
     oprot.writeFieldBegin('b', TType.I32, 2)
     oprot.writeI32(self.b)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()