]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commit
Greatly simplify the depth computation in su_init()
authorVincent Pit <vince@profvince.com>
Fri, 24 Jul 2015 19:22:21 +0000 (16:22 -0300)
committerVincent Pit <vince@profvince.com>
Fri, 24 Jul 2015 19:34:58 +0000 (16:34 -0300)
commit0fa298f68579e3e7c832504a7b9cfa367b024217
tree4aa0a3bb25fa385e453572aff0ac3ee9dadef7d1
parent181496f2ca2ce70348ee900a89f3e8854958c385
Greatly simplify the depth computation in su_init()

In order to count how many scopes we will have to pop, it is enough to take
the difference between the current scope (PL_scopestack_ix) and the one
just below the target context (cxstack[cxix].blk_oldscopesp).
Upper.xs