Merge branch 'master' into dev
[lttng-ust.git] / tools / lttng-gen-tp
old mode 100644 (file)
new mode 100755 (executable)
index 3f28534..828bee6
@@ -158,9 +158,11 @@ class TemplateFile:
         self.text = f.read()
 
         #Remove # comments (from input and output file
-        self.text = re.sub("#.*$","",self.text,flags=re.MULTILINE)
+        removeComments = re.compile("#.*$",flags=re.MULTILINE)
+        self.text = removeComments.sub("",self.text)
         #Remove // comments
-        nolinecomment = re.sub("\/\/.*$","",self.text,flags=re.MULTILINE)
+        removeLineComment = re.compile("\/\/.*$",flags=re.MULTILINE)
+        nolinecomment = removeLineComment.sub("",self.text)
         #Remove all spaces and lines
         cleantext = re.sub("\s*","",nolinecomment)
         #Remove multine C style comments
This page took 0.023497 seconds and 4 git commands to generate.