]> git.cworth.org Git - apitrace/commitdiff
Avoid consecutive const keywords.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 30 Jun 2009 17:58:47 +0000 (18:58 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 30 Jun 2009 17:58:47 +0000 (18:58 +0100)
base.py

diff --git a/base.py b/base.py
index 24641bc16aefb4648ed90d3832bbe9190c9f89a3..91673988c3bd6c5e177d7054765610957b88a8df 100644 (file)
--- a/base.py
+++ b/base.py
@@ -117,7 +117,10 @@ class Const(Type):
         self.type.dump(instance)
 
     def __str__(self):
-        return "const " + str(self.type)
+        if isinstance(self.type, Pointer):
+            return str(self.type) + " const"
+        else:
+            return "const " + str(self.type)
 
 
 class Pointer(Type):
@@ -456,7 +459,7 @@ class _String(Type):
         Type.__init__(self, "String")
 
     def __str__(self):
-        return "const char *"
+        return "char *"
 
     def dump(self, instance):
         print '    Log::DumpString((const char *)%s);' % instance
@@ -469,7 +472,7 @@ class _WString(Type):
         Type.__init__(self, "WString")
 
     def __str__(self):
-        return "const wchar_t *"
+        return "wchar_t *"
 
     def dump(self, instance):
         print '    Log::DumpWString(%s);' % instance