Skip to content

Commit d62b190

Browse files
committed
Fix nasty depwarn on nightly
1 parent 0257acc commit d62b190

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mpi-base.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,12 @@ function type_create(T::DataType)
127127

128128
# get the data from the type
129129
fieldtypes = T.types
130-
offsets = fieldoffsets(T)
131130
nfields = Cint(length(fieldtypes))
131+
if VERSION < v"0.5.0-dev+2285"
132+
offsets = fieldoffsets(T)
133+
else
134+
offsets = map(idx->fieldoffset(T, idx), 1:nfields)
135+
end
132136

133137
# put data in MPI format
134138
blocklengths = ones(Cint, nfields)

0 commit comments

Comments
 (0)