Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 7294e9f9f09f98d7bff4bfdae266a8f8121f907c https://github.com/Perl/perl5/commit/7294e9f9f09f98d7bff4bfdae266a8f8121f907c Author: Hugo van der Sanden <h...@crypt.org> Date: 2022-03-04 (Fri, 04 Mar 2022)
Changed paths: M ext/XS-APItest/t/grok.t M numeric.c Log Message: ----------- gh19010: fix returns for Perl_grok_infnan Consistently honour what the docs have always promised: If an infinity or a not-a-number is recognized, C<*sp> will point to one byte past the end of the recognized string. If the recognition fails, zero is returned, and C<*sp> will not move. Additionally, restore Perl_grok_number_flags to allowing inf/nan with trailing garbage only when called with PERL_SCAN_TRAILING; add notes to the other two core callers to clarify that they always accept such trailing garbage. A small number of XS-APItest tests were modified to reflect the stricter behaviour: "Infin" and "nanx" are now invalid without PERL_SCAN_TRAILING. Commit: 6e5a616fb95344835944fb3cab56c5c69a3b9848 https://github.com/Perl/perl5/commit/6e5a616fb95344835944fb3cab56c5c69a3b9848 Author: Hugo van der Sanden <h...@crypt.org> Date: 2022-03-04 (Fri, 04 Mar 2022) Changed paths: M numeric.c Log Message: ----------- gh19010: regularize handling of trailing whitespace on inf/nan Always accept trailing whitespace when parsing Inf/NaN constructs, even inside parens, without flagging as "trailing garbage". Also fix off-by-one checking whether we reached the close-paren of 'nan(123)'. Commit: 46da8a0d99e5820fe6ceeeb483a44ebf547bbff0 https://github.com/Perl/perl5/commit/46da8a0d99e5820fe6ceeeb483a44ebf547bbff0 Author: Hugo van der Sanden <h...@crypt.org> Date: 2022-03-04 (Fri, 04 Mar 2022) Changed paths: M ext/XS-APItest/t/grok.t Log Message: ----------- gh19010: simplify and expand inf/nan tests We know how grok results should vary with and without PERL_SCAN_TRAILING both for inputs with trailing garbage and those without, so abstract that out and test both cases for each input. Commit: 1bd2ffc2ed1dd21ac38de7e081c97ef241eebf5b https://github.com/Perl/perl5/commit/1bd2ffc2ed1dd21ac38de7e081c97ef241eebf5b Author: Hugo van der Sanden <h...@crypt.org> Date: 2022-03-04 (Fri, 04 Mar 2022) Changed paths: M numeric.c Log Message: ----------- gh19010: add NOT_REACHED Compare: https://github.com/Perl/perl5/compare/98656496a12e...1bd2ffc2ed1d