Skip to content
Snippets Groups Projects
Commit 23701cab authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Minor fixes to types

parent 94e18cf3
No related branches found
No related tags found
No related merge requests found
Pipeline #59881 failed
...@@ -12,7 +12,7 @@ class PsAbstractType(ABC): ...@@ -12,7 +12,7 @@ class PsAbstractType(ABC):
"""Base class for all pystencils types. """Base class for all pystencils types.
Implementation Notes Implementation Notes
==================== --------------------
**Type Equality:** Subclasses must implement `__eq__`, but may rely on `_base_equal` to implement **Type Equality:** Subclasses must implement `__eq__`, but may rely on `_base_equal` to implement
type equality checks. type equality checks.
...@@ -119,7 +119,8 @@ class PsPointerType(PsAbstractType): ...@@ -119,7 +119,8 @@ class PsPointerType(PsAbstractType):
def _c_string(self) -> str: def _c_string(self) -> str:
base_str = self._base_type._c_string() base_str = self._base_type._c_string()
return f"{base_str} * {self._const_string()}" restrict_str = " RESTRICT" if self._restrict else ""
return f"{base_str} *{restrict_str} {self._const_string()}"
def __repr__(self) -> str: def __repr__(self) -> str:
return f"PsPointerType( {repr(self.base_type)}, const={self.const} )" return f"PsPointerType( {repr(self.base_type)}, const={self.const} )"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment