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 /perl.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 'perl.h')
-rw-r--r-- | perl.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -597,9 +597,9 @@ # define TAINT_WARN_get 0 # define TAINT_WARN_set(s) NOOP #else -# define TAINT (PL_tainted = TRUE) +# define TAINT (PL_tainted = PL_tainting) # define TAINT_NOT (PL_tainted = FALSE) -# define TAINT_IF(c) if (UNLIKELY(c)) { PL_tainted = TRUE; } +# define TAINT_IF(c) if (UNLIKELY(c)) { PL_tainted = PL_tainting; } # define TAINT_ENV() if (UNLIKELY(PL_tainting)) { taint_env(); } # define TAINT_PROPER(s) if (UNLIKELY(PL_tainting)) { taint_proper(NULL, s); } # define TAINT_set(s) (PL_tainted = (s)) |