pp.c:pp_undef: Don’t vivify the scalar slot
authorFather Chrysostomos <sprout@cpan.org>
Mon, 28 Oct 2013 19:38:46 +0000 (12:38 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 28 Oct 2013 23:15:10 +0000 (16:15 -0700)
commit2e3295e33c63f6b4e7c3db43ec277607d5ce716d
treed5bd6c528caa976f4d710bb40754e4de4340668c
parentf03015cd13f257d2f93b154f1f908d7d6cc407e0
pp.c:pp_undef: Don’t vivify the scalar slot

When PERL_DONT_CREATE_GVSV is defined, perl generally does not vivify
the scalar slot in every GV.  But it hides that implementation detail
by vivifying it when *foo{SCALAR} is accessed.

undef(*foo) was one exception to this.  It vivified the scalar in
the scalar slot regardless of whether PERL_DONT_CREATE_GVSV was
defined.

Until recently, it was not safe to remove this exception, because a
typeglob with no scalar could be a candidate for downgrading (see
gv.c:gv_try_downgrade), causing global pointers like PL_DBgv to point
to freed SVs.  Recent commits have fixed all those cases, so this
is now safe.
pp.c