Allow casting pointers to ints in cbuilder
This commit is contained in:
parent
20d0bf9f2a
commit
081b41db60
1 changed files with 4 additions and 0 deletions
|
|
@ -1153,6 +1153,10 @@ class PointerCasting(OperatorMixin):
|
|||
|
||||
if _is_pointer(ty):
|
||||
return self._temp(self.parent.builder.bitcast(self.value, ty))
|
||||
|
||||
if _is_int(ty):
|
||||
return self._temp(self.parent.builder.ptrtoint(self.value, ty))
|
||||
|
||||
raise CastError(self.type, ty)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue