Skip to content

Commit 3738671

Browse files
authored
Fixes for Julia 1.11. (#500)
1 parent e21889b commit 3738671

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/JLArrays/src/JLArrays.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Base.size(x::JLDeviceArray) = x.dims
9797
Base.sizeof(x::JLDeviceArray) = Base.elsize(x) * length(x)
9898

9999
Base.unsafe_convert(::Type{Ptr{T}}, x::JLDeviceArray{T}) where {T} =
100-
Base.unsafe_convert(Ptr{T}, x.data) + x.offset*Base.elsize(x)
100+
convert(Ptr{T}, pointer(x.data)) + x.offset*Base.elsize(x)
101101

102102
# conversion of untyped data to a typed Array
103103
function typed_data(x::JLDeviceArray{T}) where {T}
@@ -269,7 +269,7 @@ Base.size(x::JLArray) = x.dims
269269
Base.sizeof(x::JLArray) = Base.elsize(x) * length(x)
270270

271271
Base.unsafe_convert(::Type{Ptr{T}}, x::JLArray{T}) where {T} =
272-
Base.unsafe_convert(Ptr{T}, x.data[]) + x.offset*Base.elsize(x)
272+
convert(Ptr{T}, pointer(x.data[])) + x.offset*Base.elsize(x)
273273

274274

275275
## interop with Julia arrays

0 commit comments

Comments
 (0)