Skip to content

Commit d636946

Browse files
fix backwards compatibility
1 parent d266d72 commit d636946

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ext/ArrayInterfaceOffsetArraysExt.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
module ArrayInterfaceOffsetArraysExt
22

33
using ArrayInterface
4-
using OffsetArrays
5-
using Static
4+
if isdefined(Base, :get_extension)
5+
using OffsetArrays
6+
using Static
7+
else
8+
using ..OffsetArrays
9+
using ..Static
10+
end
611

712
relative_offsets(r::OffsetArrays.IdOffsetRange) = (getfield(r, :offset),)
813
relative_offsets(A::OffsetArrays.OffsetArray) = getfield(A, :offsets)

0 commit comments

Comments
 (0)