[Qemu-devel] [PATCH v3 11/12] decodetree: Prefix extract function names with decode_function

Richard Henderson posted 12 patches 6 years, 8 months ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>
[Qemu-devel] [PATCH v3 11/12] decodetree: Prefix extract function names with decode_function
Posted by Richard Henderson 6 years, 8 months ago
This makes it easier to name Formats within multiple decode files.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 scripts/decodetree.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index eef32f695f..f8df89e072 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -312,7 +312,8 @@ class Format(General):
     """Class representing an instruction format"""
 
     def extract_name(self):
-        return 'extract_' + self.name
+        global decode_function
+        return decode_function + '_extract_' + self.name
 
     def output_extract(self):
         output('static void ', self.extract_name(), '(',
-- 
2.17.2