summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-05-08 22:40:09 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-05-08 22:40:09 +0200
commit365c4e3d7660763689bc62ead0a9a495a26bcad7 (patch)
treefdfa2c48890cd5bc31d82e56062f9118e8d06f85 /pp_ctl.c
parent6d743019f3ff1c2efcf74a1e4f98ea5bd3b7351a (diff)
downloadperl-365c4e3d7660763689bc62ead0a9a495a26bcad7.tar.gz
Inline macros used only once
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index c601f7cbb8..6a5ea652b4 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4000,12 +4000,6 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
SV *e = TOPs; /* e is for 'expression' */
SV *d = TOPm1s; /* d is for 'default', as in PL_defgv */
-# define SM_SEEN_THIS(sv) hv_exists_ent(seen_this, \
- sv_2mortal(newSViv(PTR2IV(sv))), 0)
-
-# define SM_SEEN_OTHER(sv) hv_exists_ent(seen_other, \
- sv_2mortal(newSViv(PTR2IV(sv))), 0)
-
if (SvAMAGIC(e)) {
SV * const tmpsv = amagic_call(d, e, smart_amg, 0);
if (tmpsv) {
@@ -4265,8 +4259,10 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
if (this_elem || other_elem)
RETPUSHNO;
}
- else if (SM_SEEN_THIS(*this_elem)
- || SM_SEEN_OTHER(*other_elem))
+ else if (hv_exists_ent(seen_this,
+ sv_2mortal(newSViv(PTR2IV(*this_elem))), 0) ||
+ hv_exists_ent(seen_other,
+ sv_2mortal(newSViv(PTR2IV(*other_elem))), 0))
{
if (*this_elem != *other_elem)
RETPUSHNO;