summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-07-08 15:47:23 +0100
committerDavid Mitchell <davem@iabyn.com>2017-07-27 11:30:22 +0100
commitf4c975aa030b7ad74a7efda242fb8b771ea41c14 (patch)
tree44c906576016c351aed4443e10c27898833fbb68 /pp.c
parent775f2c0793edf33325b9ef09b476245658cfd66b (diff)
downloadperl-f4c975aa030b7ad74a7efda242fb8b771ea41c14.tar.gz
make callers of SvTRUE() more efficient
Where its obvious that the args can't be null, use SvTRUE_NN() instead. Avoid possible multiple evaluations of the arg by assigning to a local var first if necessary.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index d76d0b877f..6acfcdc4ee 100644
--- a/pp.c
+++ b/pp.c
@@ -2621,8 +2621,11 @@ PP(pp_negate)
PP(pp_not)
{
dSP;
+ SV *sv;
+
tryAMAGICun_MG(not_amg, AMGf_set);
- *PL_stack_sp = boolSV(!SvTRUE_nomg(*PL_stack_sp));
+ sv = *PL_stack_sp;
+ *PL_stack_sp = boolSV(!SvTRUE_nomg_NN(sv));
return NORMAL;
}