From 19790226fee0a218cecbc20ffb967809f0e551b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:45:42 +0200 Subject: [PATCH] [DecompilerTask] remove monkey patching of task object (#344) --------- Co-authored-by: fnhartmann Co-authored-by: fnhartmann --- 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