develooper Front page | perl.perl5.changes | Postings from May 2020

[Perl/perl5] 5ff7f2: regcomp.c: Improve dump ANYOFR patterns

From:
Karl Williamson
Date:
May 13, 2020 04:49
Subject:
[Perl/perl5] 5ff7f2: regcomp.c: Improve dump ANYOFR patterns
Message ID:
Perl/perl5/push/refs/heads/smoke-me/khw-charnames/000000-ecec7f@github.com
  Branch: refs/heads/smoke-me/khw-charnames
  Home:   https://github.com/Perl/perl5
  Commit: 5ff7f200c0dc1974e392e1543b24fa92e3813038
      https://github.com/Perl/perl5/commit/5ff7f200c0dc1974e392e1543b24fa92e3813038
  Author: Karl Williamson <khw@cpan.org>
  Date:   2020-05-01 (Fri, 01 May 2020)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  regcomp.c: Improve dump ANYOFR patterns

On ASCII platforms, where its easy to calculate, when dumping a pattern,
don't output the lowest first UTF-8 byte when the entire range is ASCII.
The info about this minimum byte is carried in the node, but is ignored
unless the pattern is UTF-8, and in the case of UTF-8 invariant
characters gives no extra help.  The information is quite useful for
large code points, so we can quickly rule out large swaths of potential
matches without having to convert the target UTF-8 string to code point
format.  But for ASCII matches it isn't helpful and dumping it is just
extra noise.


  Commit: ecec7feb5b44ff722a9d3e7574fa0fa2cf6d1d06
      https://github.com/Perl/perl5/commit/ecec7feb5b44ff722a9d3e7574fa0fa2cf6d1d06
  Author: Karl Williamson <khw@cpan.org>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M lib/charnames.pm
    M lib/charnames.t

  Log Message:
  -----------
  charnames: Explicitly return undef for empty input

Rather it returns an empty list for undefined or zero width input names.

This fixes #17768


Compare: https://github.com/Perl/perl5/compare/5ff7f200c0dc%5E...ecec7feb5b44



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About