From 0235c5efbbd21164084eccc69e12083001bd6016 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 30 Jun 2009 18:58:47 +0100 Subject: [PATCH] Avoid consecutive const keywords. --- base.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.45.2