summaryrefslogtreecommitdiff
path: root/dev-util/roctracer/files/roctracer-3.8.0-gen_ostream_ops-toPython3.patch
blob: b73949b92331462886a0b38f4b2d3ca6716e1464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/script/gen_ostream_ops.py	2020-09-27 11:23:37.833756185 +0200
+++ b/script/gen_ostream_ops.py	2020-09-27 11:21:25.763756688 +0200
@@ -176,9 +176,9 @@
             process_struct(f, c, cppHeader, "", apiname)
             global_str = "\n".join(global_str.split("\n")[0:-2])
             if structs_depth != -1: #reindent
-              global_str = string.split(global_str, '\n')
-              global_str = ['    ' + string.lstrip(line) for line in global_str]
-              global_str = string.join(global_str, '\n')
+              global_str = global_str.split('\n')
+              global_str = ['    ' + line.lstrip() for line in global_str]
+              global_str = str.join('\n', global_str)
             f.write(global_str+"\n")
             if structs_depth != -1:
               f.write("  };\n")
@@ -199,9 +199,9 @@
             process_struct(f, c, cppHeader, "", apiname)
             global_str = "\n".join(global_str.split("\n")[0:-2])
             if structs_depth != -1: #reindent
-              global_str = string.split(global_str, '\n')
-              global_str = ['    ' + string.lstrip(line) for line in global_str]
-              global_str = string.join(global_str, '\n')
+              global_str = global_str.split('\n')
+              global_str = ['    ' + line.lstrip() for line in global_str]
+              global_str = str.join('\n', global_str)
             f.write(global_str+"\n")
             if structs_depth != -1:
               f.write("  };\n")