Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/3084
Change subject: scons: Replace str(foo.get_contents()) with
foo.get_text_contents().
......................................................................
scons: Replace str(foo.get_contents()) with foo.get_text_contents().
For Value() nodes, the get_contents() method and the get_text_contents()
method are just aliases to the same thing, both of which return a value
which has already been converted using str(). The str() which was included
explicitly in the SConscript was redundant, except that it showed that the
value from get_contents was being treated as a string. To avoid the
redundancy but to still leave a hint to the value's type, this change
converts those bits of code to use get_text_contents() and removes the
str().
Change-Id: I8f7da9b652f749e741b553c9a0e2248ae15ec3ca
---
M src/SConscript
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/SConscript b/src/SConscript
index c15da03..155dcf5 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -610,7 +610,7 @@
def createSimObjectParamStruct(target, source, env):
assert len(target) == 1 and len(source) == 1
- name = str(source[0].get_contents())
+ name = source[0].get_text_contents()
obj = sim_objects[name]
code = code_formatter()
@@ -632,7 +632,7 @@
def createEnumStrings(target, source, env):
assert len(target) == 1 and len(source) == 2
- name = str(source[0].get_contents())
+ name = source[0].get_text_contents()
use_python = source[1].read()
obj = all_enums[name]
@@ -645,7 +645,7 @@
def createEnumDecls(target, source, env):
assert len(target) == 1 and len(source) == 1
- name = str(source[0].get_contents())
+ name = source[0].get_text_contents()
obj = all_enums[name]
code = code_formatter()
@@ -653,7 +653,7 @@
code.write(target[0].abspath)
def createSimObjectPyBindWrapper(target, source, env):
- name = source[0].get_contents()
+ name = source[0].get_text_contents()
obj = sim_objects[name]
code = code_formatter()
--
To view, visit https://gem5-review.googlesource.com/3084
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f7da9b652f749e741b553c9a0e2248ae15ec3ca
Gerrit-Change-Number: 3084
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev