Skip to content

Commit a55ce33

Browse files
committed
add perldelta for sv_numeq fix and other sv_num* additions
modified the sv.c documentation since the perldelta sv_numeq link had multiple targets.
1 parent b9631cb commit a55ce33

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

pod/perldelta.pod

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,18 @@ well.
348348

349349
=item *
350350

351-
XXX
351+
Fixed a bug in the L<perlapi/sv_numeq> API where values with numeric
352+
("0+") overloading but not equality or numeric comparison overloading
353+
would always be compared as floating point values. This could lead to
354+
large integers being reported as equal when they weren't.
355+
356+
=item *
357+
358+
Added L<perlapi/sv_numne>, sv_numle, sv_numlt, sv_numge, sv_numgt and
359+
L<perlapi/sv_numcmp> APIs that perform numeric comparison in the same
360+
way perl does, including overloading. Separate APIs for each
361+
comparison are needed to invoke their corresponding overload when
362+
needed. Inspired by [GH #23918]
352363

353364
=back
354365

sv.c

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8756,39 +8756,27 @@ These return a boolean that is the result of the corresponding numeric
87568756

87578757
=over
87588758

8759-
=item C<sv_numeq>
8760-
8761-
=item C<sv_numeq_flags>
8759+
=item C<sv_numeq>, C<sv_numeq_flags>
87628760

87638761
Numeric equality, the same as S<C<$sv1 == $sv2>>.
87648762

8765-
=item C<sv_numne>
8766-
8767-
=item C<sv_numne_flags>
8763+
=item C<sv_numne>, C<sv_numne_flags>
87688764

87698765
Numeric inequality, the same as S<C<$sv1 != $sv2>>.
87708766

8771-
=item C<sv_numle>
8772-
8773-
=item C<sv_numle_flags>
8767+
=item C<sv_numle>, C<sv_numle_flags>
87748768

87758769
Numeric less than or equal, the same as S<C<$sv1 E<lt>= $sv2>>.
87768770

8777-
=item C<sv_numlt>
8778-
8779-
=item C<sv_numlt_flags>
8771+
=item C<sv_numlt>, C<sv_numlt_flags>
87808772

87818773
Numeric less than, the same as S<C<$sv1 E<lt> $sv2>>.
87828774

8783-
=item C<sv_numge>
8784-
8785-
=item C<sv_numge_flags>
8775+
=item C<sv_numge>, C<sv_numge_flags>
87868776

87878777
Numeric greater than or equal, the same as S<C<$sv1 E<gt>= $sv2>>.
87888778

8789-
=item C<sv_numgt>
8790-
8791-
=item C<sv_numgt_flags>
8779+
=item C<sv_numgt>, C<sv_numgt_flags>
87928780

87938781
Numeric greater than, the same as S<C<$sv1 E<gt> $sv2>>.
87948782

0 commit comments

Comments
 (0)