Fix some stuff
support casting int <-> pointers in llvm_cbuilder
assign ndarray type to fake PyArrays
This commit is contained in:
parent
ab0ce0d49a
commit
f0ad108e2c
2 changed files with 6 additions and 0 deletions
|
|
@ -1057,6 +1057,11 @@ class IntegerValue(OperatorMixin):
|
|||
return self._temp(self.parent.builder.sext(self.value, ty))
|
||||
else:
|
||||
return self._temp(self.parent.builder.trunc(self.value, ty))
|
||||
elif _is_pointer(ty) and _is_int(self.type):
|
||||
return self._temp(self.parent.builder.inttoptr(self.value, ty))
|
||||
elif _is_int(ty) and _is_pointer(self.type):
|
||||
return self._temp(self.parent.builder.ptrtoint(self.value, ty))
|
||||
|
||||
raise CastError(self.type, ty)
|
||||
|
||||
class RealValue(OperatorMixin):
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ float = Type.float()
|
|||
double = Type.double()
|
||||
|
||||
npy_intp = minitypes.npy_intp.to_llvm(numba.decorators.context)
|
||||
py_ssize_t = minitypes.Py_ssize_t.to_llvm(numba.decorators.context)
|
||||
|
||||
# pointers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue