This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove special string handling from sv.c:sv_reset
authorFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 20:14:03 +0000 (13:14 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 20:14:03 +0000 (13:14 -0700)
commit4a8374a642996ba607363ad1659472af37b02fb2
treead1efb2be858f4751edbaaf2487b6768ec2d00ba
parente926b44d3d2f98879b732492ad9016c884f8e1f1
Remove special string handling from sv.c:sv_reset

Once upon a time, "" and undef were equivalent, and str_reset (as it
was called) would turn a scalar into an empty string.

Since commit 79072805bf6 (perl 5.0 alpha 2), sv_reset has set sca-
lars to undef.

Setting SvCUR to 0 and *SvPVX to '\0' (converted from str->cur and
str->ptr[0] by the same commit 79072805bf6) has not been neces-
sary since.
sv.c