This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PerlIO::via: fix compiler warning
authorDavid Mitchell <davem@iabyn.com>
Mon, 18 Nov 2013 14:52:57 +0000 (14:52 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 18 Nov 2013 17:14:22 +0000 (17:14 +0000)
commit63d83481e2cd52a64f36a54ea50d29ca81aca410
treef060202b17553330dbfe51eeb62587fbd2ef556b
parent8380d35aa2712976e84a271f136604befc69b5a3
PerlIO::via: fix compiler warning

In
    GV *gv = newGVgen(HvNAME_get(s->stash))

HvNAME_get() can return a null value (don't know whether it ever will in
these circumstances), while newGVgen() expects a non-null arg.

So calculate HvNAME_get() first, and bail if it's null.
ext/PerlIO-via/via.pm
ext/PerlIO-via/via.xs