From a5729ff2eec9b35a514cd89d7e853d9af0666e06 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 17 Sep 2025 12:59:54 -0600 Subject: [PATCH] perlapi: Reword sv_numeq entry This is more compact and, I believe, readable than before --- sv.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sv.c b/sv.c index 5bea2ed6baf5..f0d80073791b 100644 --- a/sv.c +++ b/sv.c @@ -8708,19 +8708,23 @@ Perl_sv_streq_flags(pTHX_ SV *sv1, SV *sv2, const U32 flags) =for apidoc sv_numeq =for apidoc_item sv_numeq_flags -These each return a boolean indicating whether the numbers in the two SV -arguments are identical. Those arguments will be coerced to numbers if -necessary. A C SV is treated as C. +These each return a boolean indicating if the numbers in the two SV arguments +are identical, coercing them to numbers if necessary, basically behaving like +the Perl code S>. -In C, if C has the C bit set, 'get' magic is -handled. +A NULL SV is treated as C. -And unless C has the C bit set, an attempt to use -C<==> overloading will be made. If such overloading does not exist or the flag -is set, then regular numerical comparison will be used instead. +C always performs 'get' magic. C performs 'get' +magic only if C has the C bit set. -C merely calls C with just the C bit set. -This function basically behaves like the Perl code C<$sv1 == $sv2>. +C always checks for, and if present, handles C<==> overloading. If +not present, regular numerical comparison will be used instead. +C normally does the same, but setting the C +bit set in C causes it to use regular numerical comparison. + +Otherwise, the functions behave identically. + +=for apidoc Amnh||SV_SKIP_OVERLOAD =cut */