From bc55aacb955ac5704f06202afa07e59cfd0748c1 Mon Sep 17 00:00:00 2001 From: fnhartmann Date: Wed, 27 Sep 2023 09:19:17 +0000 Subject: [PATCH 1/2] Create draft PR for #170 From 27a44f8a9c2ac30fc73bef4ed6625f8d89a6a713 Mon Sep 17 00:00:00 2001 From: fnhartmann Date: Wed, 27 Sep 2023 12:02:52 +0200 Subject: [PATCH 2/2] Added property, getter, setter --- decompiler/task.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/decompiler/task.py b/decompiler/task.py index 38f149a7b..d476e71ec 100644 --- a/decompiler/task.py +++ b/decompiler/task.py @@ -39,6 +39,7 @@ def __init__( self._failed = False self._failure_origin = None self._complex_types = complex_types if complex_types else ComplexTypeMap() + self._code = None @property def name(self) -> str: @@ -99,3 +100,13 @@ def failure_message(self) -> str: def complex_types(self) -> ComplexTypeMap: """Return complex types present in the function (structs, unions, enums, etc.).""" return self._complex_types + + @property + def code(self) -> str: + """Return C-Code representation for the Task.""" + return self._code + + @code.setter + def code(self, value): + """Setter function for C-Code representation of the Task""" + self._code = value \ No newline at end of file