From: Rafael Garcia-Suarez Date: Tue, 24 Mar 2009 17:30:20 +0000 (+0100) Subject: Inline macro tryAMAGICbinSET() in smart match routine X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c41e62ef63f12c6c4bde601a6af608e863d3f10;p=p5sagit%2Fp5-mst-13.2.git Inline macro tryAMAGICbinSET() in smart match routine (to build tricks on a sane base) --- diff --git a/pp_ctl.c b/pp_ctl.c index a8a3610..1c68602 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 */