Skip to content

Commit 9253802

Browse files
committed
Make sure __tmp_api__ is initialized for modules
1 parent 4db5693 commit 9253802

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ModuleInterfaceTools.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,13 @@ function _api(curmod::Module, cmd::Symbol, exprs)
341341
cmd == :list && return _api_list(curmod, modules)
342342

343343
cpy = (cmd == :use!) || (cmd == :extend!)
344+
cpy && _init_api(curmod)
344345

345346
for nam in modules
346347
mod = m_eval(curmod, nam)
347348
if has_api(mod)
348349
for sym in getfield(get_api(mod), :modules)
349350
if isdefined(mod, sym)
350-
println("curmod=$curmod, using $nam.$sym, cpy=$cpy")
351351
m_eval(curmod, :(using $nam.$sym))
352352
cpy && m_eval(curmod, :( push!(__tmp_api__.modules, $(QuoteNode(sym)) )))
353353
else
@@ -357,7 +357,6 @@ function _api(curmod::Module, cmd::Symbol, exprs)
357357
end
358358
end
359359

360-
cpy && _init_api(curmod)
361360
((cmd == :use || cmd == :use!)
362361
? _api_use(curmod, modules, cpy)
363362
: _api_extend(curmod, modules, cpy))

0 commit comments

Comments
 (0)