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

Method writeBool

lib/py/src/protocol/TCompactProtocol.py:253–266  ·  view source on GitHub ↗
(self, bool)

Source from the content-addressed store, hash-verified

251 writeListEnd = writeCollectionEnd
252
253 def writeBool(self, bool):
254 if self.state == BOOL_WRITE:
255 if bool:
256 ctype = CompactType.TRUE
257 else:
258 ctype = CompactType.FALSE
259 self.__writeFieldHeader(ctype, self.__bool_fid)
260 elif self.state == CONTAINER_WRITE:
261 if bool:
262 self.__writeByte(CompactType.TRUE)
263 else:
264 self.__writeByte(CompactType.FALSE)
265 else:
266 raise AssertionError("Invalid state in compact protocol")
267
268 writeByte = writer(__writeByte)
269 writeI16 = writer(__writeI16)

Callers 2

testNakedFunction · 0.95
testFieldFunction · 0.95

Calls 2

__writeFieldHeaderMethod · 0.95
__writeByteMethod · 0.95

Tested by

no test coverage detected