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

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

From:
Karl Williamson
Date:
May 27, 2020 08:10
Subject:
[Perl/perl5] da3350: regcomp.c: Improve dump ANYOFR patterns
Message ID:
Perl/perl5/push/refs/heads/blead/28bfed-a39c5d@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: da3350397f4030c098c43eb8ce4ea964e886d2eb
      https://github.com/Perl/perl5/commit/da3350397f4030c098c43eb8ce4ea964e886d2eb
  Author: Karl Williamson <khw@cpan.org>
  Date:   2020-05-27 (Wed, 27 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: a39c5dfbc6cedea1c77a56bd4e4febee38a812c1
      https://github.com/Perl/perl5/commit/a39c5dfbc6cedea1c77a56bd4e4febee38a812c1
  Author: Karl Williamson <khw@cpan.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M lib/_charnames.pm
    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/28bfed14e747...a39c5dfbc6ce



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