Skip to content

Commit 8a82284

Browse files
committed
sv_numcmp_common: only call magic once if the SVs are the same
similar to try_amagic_bin()
1 parent 3dfca8b commit 8a82284

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
@@ -8717,7 +8717,7 @@ S_sv_numcmp_common(pTHX_ SV **sv1, SV **sv2, const U32 flags,
87178717
if(flags & SV_GMAGIC) {
87188718
if(*sv1)
87198719
SvGETMAGIC(*sv1);
8720-
if(*sv2)
8720+
if(*sv2 && (!*sv1 || *sv1 != *sv2))
87218721
SvGETMAGIC(*sv2);
87228722
}
87238723

0 commit comments

Comments
 (0)