Skip to content

Commit 60eb385

Browse files
committed
Update using modules
1 parent 4d8b790 commit 60eb385

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/APITools.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,8 @@ function _api(curmod::Module, cmd::Symbol, exprs)
237237
esc(Expr(:toplevel, lst..., nothing))
238238
end
239239

240-
@static if V6_COMPAT
241-
macro api(cmd::Symbol, exprs...) ; _api(current_module(), cmd, exprs) ; end
242-
else
243-
macro api(cmd::Symbol, exprs...) ; _api(__module__, cmd, exprs) ; end
240+
macro api(cmd::Symbol, exprs...)
241+
@static V6_COMPAT ? _api(current_module(), cmd, exprs) : _api(__module__, cmd, exprs)
244242
end
245243

246244
function _make_module_list(mod, lst)
@@ -251,12 +249,8 @@ end
251249

252250
function _make_list(cmd, mod, lst)
253251
isempty(lst) && return nothing
254-
@static if VERSION < v"0.7.0-DEV"
255-
length(lst) > 1 ?
256-
Expr(:toplevel, [Expr(cmd, mod, nam) for nam in lst]...) : Expr(cmd, mod, lst[1])
257-
else
258-
Expr(cmd, Expr(:(:), Expr(:., mod), [Expr(:., nam) for nam in lst]...))
259-
end
252+
length(lst) > 1 ?
253+
Expr(:toplevel, [Expr(cmd, mod, nam) for nam in lst]...) : Expr(cmd, mod, lst[1])
260254
end
261255

262256
function _make_exprs(cmd, mod, grp)

0 commit comments

Comments
 (0)