MCPcopy Create free account
hub / github.com/apache/thrift / writeMapBegin

Method writeMapBegin

lib/py/src/protocol/TCompactProtocol.py:236–244  ·  view source on GitHub ↗
(self, ktype, vtype, size)

Source from the content-addressed store, hash-verified

234 writeListBegin = writeCollectionBegin
235
236 def writeMapBegin(self, ktype, vtype, size):
237 assert self.state in (VALUE_WRITE, CONTAINER_WRITE), self.state
238 if size == 0:
239 self.__writeByte(0)
240 else:
241 self.__writeSize(size)
242 self.__writeUByte(CTYPES[ktype] << 4 | CTYPES[vtype])
243 self.__containers.append(self.state)
244 self.state = CONTAINER_WRITE
245
246 def writeCollectionEnd(self):
247 assert self.state == CONTAINER_WRITE, self.state

Callers

nothing calls this directly

Calls 4

__writeByteMethod · 0.95
__writeSizeMethod · 0.95
__writeUByteMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected