From: José Fonseca Date: Tue, 30 Jun 2009 17:58:47 +0000 (+0100) Subject: Avoid consecutive const keywords. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=0235c5efbbd21164084eccc69e12083001bd6016;p=apitrace Avoid consecutive const keywords. --- diff --git a/base.py b/base.py index 24641bc..9167398 100644 --- 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