[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-changes
Subject:    [Perl/perl5] 3e0ccd: POSIX::mblen() Allow not resetting shift state
From:       Karl Williamson <noreply () github ! com>
Date:       2019-12-24 17:27:10
Message-ID: Perl/perl5/push/refs/heads/smoke-me/khw-locale/000000-2c6765 () github ! com
[Download RAW message or body]

  Branch: refs/heads/smoke-me/khw-locale
  Home:   https://github.com/Perl/perl5
  Commit: 3e0ccd2dc4b03d15de7ba9e3aacc599b4bc86a9e
      https://github.com/Perl/perl5/commit/3e0ccd2dc4b03d15de7ba9e3aacc599b4bc86a9e
  Author: Karl Williamson <khw@cpan.org>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    M embedvar.h
    M ext/POSIX/POSIX.xs
    M ext/POSIX/lib/POSIX.pm
    M ext/POSIX/lib/POSIX.pod
    M ext/POSIX/t/mb.t
    M intrpvar.h
    M locale.c
    M perl.h
    M pod/perldelta.pod
    M t/porting/known_pod_issues.dat

  Log Message:
  -----------
  POSIX::mblen() Allow not resetting shift state

This enhances this function so that when the first parameter is undef,
it resets any shift state, and when the parameter is non-null the state
is retained.  Previously the state was always reset with every call,
preventing adequate use of this in locales (very rarely encountered)
that have shift states.

This commit also changes it so that mblen is used instead of mbrlen if
operating under thread-safe locales.  This just made the coding easier.
And, unless there are bugs in the C library implementation of mblen,
should not matter.

[perl #133928] showed that someone was having trouble with shift states.


  Commit: ee0d6a2b32cf6f7d21c2e85b9c8a737978e7353a
      https://github.com/Perl/perl5/commit/ee0d6a2b32cf6f7d21c2e85b9c8a737978e7353a
  Author: Karl Williamson <khw@cpan.org>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    M ext/POSIX/t/mb.t

  Log Message:
  -----------
  ext/POSIX/t/mb.t: Add another mblen test

Also fix a skip count


  Commit: 4e090fce16270c012269c2860e7ca87b9212aed9
      https://github.com/Perl/perl5/commit/4e090fce16270c012269c2860e7ca87b9212aed9
  Author: Karl Williamson <khw@cpan.org>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    M embedvar.h
    M ext/POSIX/POSIX.xs
    M ext/POSIX/lib/POSIX.pod
    M ext/POSIX/t/mb.t
    M intrpvar.h
    M locale.c
    M pod/perldelta.pod

  Log Message:
  -----------
  POSIX::mbtowc, wctomb: Allow not resetting shift state

This commit enhances these functions so that when the appropriate
parameter is undef, any shift state is reset, and when the parameter is
non-null the state is retained.  Previously the state was always reset
with every call, preventing adequate use of these in locales (very
rarely encountered) that have shift states.

There were a number of issues in mbtowc and wctomb that this commit
fixes.  It would segfault if the string parameter was shared or hadn't
been pre-allocated with a string of sufficient length to hold the
result.

This commit also changes it so that mbtowc and wctomb are used instead
of mbrtowc and wcrtomb if operating under thread-safe locales.  This
just made the coding easier.  And, unless there are bugs in the C
library implementations, should not matter.


  Commit: 2c676543d2bc2a0031295b7cda3754ded2eaf4a3
      https://github.com/Perl/perl5/commit/2c676543d2bc2a0031295b7cda3754ded2eaf4a3
  Author: Karl Williamson <khw@cpan.org>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  mbr


Compare: https://github.com/Perl/perl5/compare/3e0ccd2dc4b0%5E...2c676543d2bc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic