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
Message ID:
63615.92.128.97.94.1209490401.squirrel@92.128.97.94
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


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