Skip to content

Commit

Permalink
Print address space pointers properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Feb 2, 2024
1 parent c0c750a commit 73cf43f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/terralib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,12 @@ do
if status then return r end
end
return self.name
elseif self:ispointer() then return "&"..tostring(self.type)
elseif self:ispointer() then
if not self.addressspace or self.addressspace == 0 then
return "&"..tostring(self.type)
else
return "pointer("..tostring(self.type)..","..tostring(self.addressspace)..")"
end
elseif self:isvector() then return "vector("..tostring(self.type)..","..tostring(self.N)..")"
elseif self:isfunction() then return mkstring(self.parameters,"{",",",self.isvararg and " ...}" or "}").." -> "..tostring(self.returntype)
elseif self:isarray() then
Expand Down

0 comments on commit 73cf43f

Please sign in to comment.