From ad7a24c082e64e6d126c5acdf04a4af7a98198f2 Mon Sep 17 00:00:00 2001
From: Jan Hoenig <hrominium@gmail.com>
Date: Mon, 20 Mar 2017 19:05:01 +0100
Subject: [PATCH] Fixed pointer str

---
 backends/dot.py | 4 ++--
 types.py        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/backends/dot.py b/backends/dot.py
index aac41d02d..63ff4651f 100644
--- a/backends/dot.py
+++ b/backends/dot.py
@@ -14,6 +14,7 @@ class DotPrinter(Printer):
         self.dot.quote_edge = lang.quote
 
     def _print_KernelFunction(self, function):
+        print(self._nodeToStrFunction(function))
         self.dot.node(self._nodeToStrFunction(function), style='filled', fillcolor='#E69F00')
         self._print(function.body)
 
@@ -74,8 +75,7 @@ def dotprint(node, view=False, short=False, full=False, **kwargs):
     :param kwargs: is directly passed to the DotPrinter class: http://graphviz.readthedocs.io/en/latest/api.html#digraph
     :return: string in DOT format
     """
-    nodeToStrFunction = __shortened if short else repr
-    nodeToStrFunction = lambda expr: repr(type(expr)) + repr(expr) if full else nodeToStrFunction
+    nodeToStrFunction = __shortened if short else lambda expr: repr(type(expr)) + repr(expr) if full else repr
     printer = DotPrinter(nodeToStrFunction, full, **kwargs)
     dot = printer.doprint(node)
     if view:
diff --git a/types.py b/types.py
index ef7763778..d4a6b6a53 100644
--- a/types.py
+++ b/types.py
@@ -303,7 +303,7 @@ class PointerType(Type):
             return (self.baseType, self.const, self.restrict) == (other.baseType, other.const, other.restrict)
 
     def __str__(self):
-        return "%s * %s%s" % (self.baseType, "RESTRICT " if self.restrict else "", "const " if self.const else "")
+        return "%s *%s%s" % (self.baseType, " RESTRICT " if self.restrict else "", " const " if self.const else "")
 
     def __hash__(self):
         return hash(str(self))
-- 
GitLab