Skip to content

Commit

Permalink
Update StructIO.jl: import from io macro
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Aug 9, 2024
1 parent f2d799d commit 64ed63f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/StructIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ macro io(typ, annotations...)
end

ret = Expr(:toplevel, :(Base.@__doc__ $(typ)))
push!(ret.args, :(import StructIO)) # issue #24
strat = (alignment == :align_default ? StructIO.Default : StructIO.Packed)
push!(ret.args, :($packing_strategy(::Type{T}) where {T <: $T} = $strat))
push!(ret.args, :(StructIO.packing_strategy(::Type{T}) where {T <: $T} = $strat))
return esc(ret)
end

Expand Down

0 comments on commit 64ed63f

Please sign in to comment.