summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-24 18:30:20 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-24 18:30:20 +0100
commit7c41e62ef63f12c6c4bde601a6af608e863d3f10 (patch)
tree69e40448427e8709c983487fc497e9f3bccc00c5 /pp_ctl.c
parent2522c35a141b3975f20e7418066d600920f74ac7 (diff)
downloadperl-7c41e62ef63f12c6c4bde601a6af608e863d3f10.tar.gz
Inline macro tryAMAGICbinSET() in smart match routine
(to build tricks on a sane base)
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index a8a36101de..1c68602e75 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4033,7 +4033,15 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
# define SM_SEEN_OTHER(sv) hv_exists_ent(seen_other, \
sv_2mortal(newSViv(PTR2IV(sv))), 0)
- tryAMAGICbinSET(smart, 0);
+ if (SvAMAGIC(d) || SvAMAGIC(e)) {
+ SV * const tmpsv = amagic_call(d, e, smart_amg, 0);
+ if (tmpsv) {
+ SPAGAIN;
+ (void)POPs;
+ SETs(tmpsv);
+ RETURN;
+ }
+ }
SP -= 2; /* Pop the values */