develooper Front page | perl.perl5.porters | Postings from April 2008

[PATCH] Double magic/warnings with binmode $fh, undef

Thread Next
From:
Vincent Pit
Date:
April 29, 2008 19:34
Subject:
[PATCH] Double magic/warnings with binmode $fh, undef
Hi.
binmode $fh, $x calls get magic twice on $x and triggers "undefined"
warnings twice too when $x isn't defined. The attached patch fixes this by
making doio.c:Perl_mode_from_discipline() take a const char * and the
according STRLEN as arguments instead of a SV, so that we can remove the
SvPV_const() inside. This changes the interface but since it's not part of
the public API it should be OK. Regen and tested against 33763.
Vincent.

Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About