Skip to content

Commit 403367e

Browse files
committed
sv_numcmp_common: only call magic once if the SVs are the same
similar to try_amagic_bin()
1 parent a55ce33 commit 403367e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8711,7 +8711,7 @@ S_sv_numcmp_common(pTHX_ SV **sv1, SV **sv2, const U32 flags,
87118711
if(flags & SV_GMAGIC) {
87128712
if(*sv1)
87138713
SvGETMAGIC(*sv1);
8714-
if(*sv2)
8714+
if(*sv2 && (!*sv1 || *sv1 != *sv2))
87158715
SvGETMAGIC(*sv2);
87168716
}
87178717

0 commit comments

Comments
 (0)