diff options
author | David Mitchell <davem@iabyn.com> | 2015-10-30 13:44:11 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-11-10 13:52:33 +0000 |
commit | d48c660dfce02fc4e698f3b0589c77612ecf27a4 (patch) | |
tree | 0123423531b3d781e9606e4f3cbc6d3530b970b6 /sv.h | |
parent | fc9a9443cb9edf6f5607176e09aebe85d00da5fe (diff) | |
download | perl-d48c660dfce02fc4e698f3b0589c77612ecf27a4.tar.gz |
avoid (TAINTING_get && TAINT_get)
In various places we test for both (PL_tainting && PL_tainted).
Since if tainting isn't enabled PL_tainted should never get set, it's
more efficient to just test for (TAINT_get).
We ensure that PL_tainted doesn't actually get set when !PL_tainting
by changing some "setting" macros from PL_tainted = TRUE to
PL_tainted = PL_tainting.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1473,10 +1473,9 @@ attention to precisely which outputs are influenced by which inputs. #define SvTAINT(sv) \ STMT_START { \ - if (UNLIKELY(TAINTING_get)) { \ - if (UNLIKELY(TAINT_get)) \ - SvTAINTED_on(sv); \ - } \ + assert(TAINTING_get || !TAINT_get); \ + if (UNLIKELY(TAINT_get)) \ + SvTAINTED_on(sv); \ } STMT_END /* |