(self, name, val)
| 1731 | """ |
| 1732 | |
| 1733 | def __setattr__(self, name, val): |
| 1734 | |
| 1735 | # If the instance doesn't yet have a struct attribute |
| 1736 | # it's not fully initialized so can't do any of the |
| 1737 | # following |
| 1738 | # |
| 1739 | if hasattr(self, "struct"): |
| 1740 | # Get the word containing the type and data |
| 1741 | # |
| 1742 | word = self.struct.Data |
| 1743 | |
| 1744 | if name == "type": |
| 1745 | word = (val << 12) | (word & 0xFFF) |
| 1746 | elif name == "rva": |
| 1747 | offset = max(val - self.base_rva, 0) |
| 1748 | word = (word & 0xF000) | (offset & 0xFFF) |
| 1749 | |
| 1750 | # Store the modified data |
| 1751 | # |
| 1752 | self.struct.Data = word |
| 1753 | |
| 1754 | self.__dict__[name] = val |
| 1755 | |
| 1756 | |
| 1757 | class TlsData(DataContainer): |
nothing calls this directly
no outgoing calls
no test coverage detected