summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-09-18 13:42:53 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-18 13:42:53 -0400
commit4292c27bea13a5ba0423c69e0ab3d0caa4a04e38 (patch)
tree1dc5882cb95497e3a774deba5fc7d5f05a034bd4 /python
parent9b6597c904243e1baa271160ca77d2b8da4218df (diff)
Make some additional dataclasses frozen
Diffstat (limited to 'python')
-rw-r--r--python/basicblock.py2
-rw-r--r--python/function.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 887f6679..623cc3ed 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -30,7 +30,7 @@ from . import architecture
from . import highlight as _highlight
from . import function as _function
-@dataclass
+@dataclass(frozen=True)
class BasicBlockEdge:
type:BranchType
source:'BasicBlock'
diff --git a/python/function.py b/python/function.py
index 229fd2f6..42e88fa3 100644
--- a/python/function.py
+++ b/python/function.py
@@ -69,9 +69,9 @@ ILInstructionType = Union['lowlevelil.LowLevelILInstruction', 'mediumlevelil.Med
def _function_name_():
return inspect.stack()[1][0].f_code.co_name
-@dataclass
+@dataclass(frozen=True)
class ArchAndAddr:
- arch:Optional['architecture.Architecture']
+ arch:'architecture.Architecture'
addr:int
def __repr__(self):