develooper Front page | perl.perl5.porters | Postings from March 2014

[perl #121486] utf8::downgrade() FAIL_OK argument should not be treated as an integer

From:
yves orton
Date:
March 21, 2014 16:50
Subject:
[perl #121486] utf8::downgrade() FAIL_OK argument should not be treated as an integer
Message ID:
rt-4.0.18-10065-1395420638-1165.121486-75-0@perl.org
# New Ticket Created by  yves orton 
# Please include the string:  [perl #121486]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=121486 >


utf8::downgrade($foo,"fail_ok");

Produces:

Argument "fail_ok" isn't numeric in subroutine entry

Cause is calling SvIV() on the argument:

const bool failok = (items < 2) ? 0 : (int)SvIV(ST(1));

Solution is to use SvTRUE() instead.

Fix is complete and is waiting test pass to push.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"




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