Explicitly specify assignment to global
This commit is contained in:
parent
99941dde8f
commit
badf302756
@ -142,7 +142,7 @@ function _animate(forloop::Expr, args...; callgif = false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
push!(block.args, :(if $filterexpr; frame($animsym); end))
|
push!(block.args, :(if $filterexpr; frame($animsym); end))
|
||||||
push!(block.args, :($countersym += 1))
|
push!(block.args, :(global $countersym += 1))
|
||||||
|
|
||||||
# add a final call to `gif(anim)`?
|
# add a final call to `gif(anim)`?
|
||||||
retval = callgif ? :(gif($animsym)) : animsym
|
retval = callgif ? :(gif($animsym)) : animsym
|
||||||
@ -151,7 +151,7 @@ function _animate(forloop::Expr, args...; callgif = false)
|
|||||||
esc(quote
|
esc(quote
|
||||||
$freqassert # if filtering, check frequency is an Integer > 0
|
$freqassert # if filtering, check frequency is an Integer > 0
|
||||||
$animsym = Animation() # init animation object
|
$animsym = Animation() # init animation object
|
||||||
$countersym = 1 # init iteration counter
|
global $countersym = 1 # init iteration counter
|
||||||
$forloop # for loop, saving a frame after each iteration
|
$forloop # for loop, saving a frame after each iteration
|
||||||
$retval # return the animation object, or the gif
|
$retval # return the animation object, or the gif
|
||||||
end)
|
end)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user