mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
universal.c - utf8::downgrade($x,FAIL_OK) is not supposed to treat FAIL_OK as an integer
This commit is contained in:
parent
b94d11d663
commit
3ca75eca84
@ -208,6 +208,15 @@ Synchronize POD changes from the CPAN release.
|
||||
|
||||
L<perl5db.pl> has been upgraded from version 1.44 to 1.45.
|
||||
|
||||
=item *
|
||||
|
||||
A mismatch between the documentation and the code in utf8::downgrade()
|
||||
was fixed in favour of the documentation. The optional second argument
|
||||
is now correctly treated as a perl boolean (true/false semantics) and
|
||||
not as an integer.
|
||||
|
||||
=item *
|
||||
|
||||
fork() in the debugger under C<tmux> will now create a new window for
|
||||
the forked process. L<[perl
|
||||
#121333]|https://rt.perl.org/Ticket/Display.html?id=121333>
|
||||
|
||||
@ -513,7 +513,7 @@ XS(XS_utf8_downgrade)
|
||||
croak_xs_usage(cv, "sv, failok=0");
|
||||
else {
|
||||
SV * const sv = ST(0);
|
||||
const bool failok = (items < 2) ? 0 : (int)SvIV(ST(1));
|
||||
const bool failok = (items < 2) ? 0 : SvTRUE(ST(1)) ? 1 : 0;
|
||||
const bool RETVAL = sv_utf8_downgrade(sv, failok);
|
||||
|
||||
ST(0) = boolSV(RETVAL);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user