``write16`` writes the lowest order two bytes from the integer ``value`` to the current offset, using internal endianness. :param int value: integer value to write. :param int address: offset to set the internal offset before writing :param bool except_on_relocation: (default True) raise e
(self, value: int, address: Optional[int] = None, except_on_relocation=True)
| 10621 | return core.BNWrite8(self._handle, value) |
| 10622 | |
| 10623 | def write16(self, value: int, address: Optional[int] = None, except_on_relocation=True) -> bool: |
| 10624 | """ |
| 10625 | ``write16`` writes the lowest order two bytes from the integer ``value`` to the current offset, using internal endianness. |
| 10626 | |
| 10627 | :param int value: integer value to write. |
| 10628 | :param int address: offset to set the internal offset before writing |
| 10629 | :param bool except_on_relocation: (default True) raise exception when write overlaps a relocation |
| 10630 | :return: boolean True on success, False on failure. |
| 10631 | :rtype: bool |
| 10632 | """ |
| 10633 | if address is not None: |
| 10634 | self.seek(address) |
| 10635 | |
| 10636 | if except_on_relocation and self._view.range_contains_relocation(self.offset, 2): |
| 10637 | raise RelocationWriteException("Attempting to write to a location which has a relocation") |
| 10638 | return core.BNWrite16(self._handle, value) |
| 10639 | |
| 10640 | def write32(self, value: int, address: Optional[int] = None, except_on_relocation=True) -> bool: |
| 10641 | """ |
nothing calls this directly
no test coverage detected