This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Don't test for 16-bit inputs in inRANGE()"
authorKarl Williamson <khw@cpan.org>
Fri, 4 Dec 2020 14:40:54 +0000 (07:40 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 6 Dec 2020 20:57:11 +0000 (13:57 -0700)
commit1442da54429bca166af716cb981dc150644ad203
tree18a31fe1f9ce8b76e568c49d31064ef82ed4935b
parent2de541a7c621c3f3e23da3d477977c545a78bf87
Revert "Don't test for 16-bit inputs in inRANGE()"

This effectively reverts commit
4c2aa7c802893d0276551ade1b9d5dcd1226afc4.

That commit removed checking for 16 bit inputs because an assert in a
macro was making compilations fail in some compilers that couldn't
handle the complexity.  This inadvertently broke systems which use C
language shorts in certain places, such Mingw and Win32 with their use
of UTF16, not typically found on other platforms.  At the time, we
weren't smoking Mingw so we didn't know about it there, but the Win32
failures on Win32 were "fixed" by another commit which disabled
assertions of this type completely.  It turns out the issue was passing
too long a string to assert().   Commits 92a0bb2 and 88086fd removed a
bunch of unnecessary and/or duplicate asserts, bringing the size down,
so that the 16 bit checks can be added back in without breaking these
compilers.

The reverted commit mentioned HP compilers as having problems.  The only
such box we currently have available for testing is HP-31, and the
reversion works fine on it, even before 92a0bb2 and 88086fd.

This fixes GH #18364
handy.h