Skip to content

Commit fa9ae7c

Browse files
committed
Fix _length in reinterpretarray
#27941 and #24899 were merged "together" but should have gotten their stories consistent first.
1 parent 8d7c145 commit fa9ae7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/reinterpretarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S, N}} <: AbstractArray{T, N}
3535
(N != 0 || sizeof(T) == sizeof(S)) || throwsize0(S, T)
3636
ax1 = axes(a)[1]
3737
if N != 0 && sizeof(S) != sizeof(T)
38-
dim = _length(ax1)
38+
dim = length(ax1)
3939
rem(dim*sizeof(S),sizeof(T)) == 0 || thrownonint(S, T, dim)
4040
first(ax1) == 1 || throwaxes1(S, T, ax1)
4141
end
@@ -77,7 +77,7 @@ end
7777

7878
function axes(a::ReinterpretArray{T,N,S} where {N}) where {T,S}
7979
paxs = axes(a.parent)
80-
f, l = first(paxs[1]), _length(paxs[1])
80+
f, l = first(paxs[1]), length(paxs[1])
8181
size1 = div(l*sizeof(S), sizeof(T))
8282
tuple(oftype(paxs[1], f:f+size1-1), tail(paxs)...)
8383
end

0 commit comments

Comments
 (0)