(refs #114)
Signed-off-by: Yannick Brosseau <[email protected]>
---
tools/lttng-gen-tp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp
index 3f28534..828bee6 100755
--- a/tools/lttng-gen-tp
+++ b/tools/lttng-gen-tp
@@ -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
--
1.7.9.1
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev