This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix definition of GvFILEGV()
authorDavid Mitchell <davem@iabyn.com>
Tue, 12 Nov 2013 15:39:04 +0000 (15:39 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Nov 2013 10:38:40 +0000 (10:38 +0000)
commitc835650ead1b96c706212d7e6d95da86cc9e8fcb
tree12342d2b372ce61459c4b68009aa276c49d5988f
parent406e3fef7f4bebd2003087bce74d22303981ac48
fix definition of GvFILEGV()

It was:

    #define GvFILE(gv)   (GvFILE_HEK(gv) ? HEK_KEY(GvFILE_HEK(gv)) : NULL)
    #define GvFILEGV(gv) (gv_fetchfile(GvFILE(gv)))

which is a problem, since gv_fetchfile() doesn't accept a non-null
argument. Change it so that the (cond ? foo : NULL) thing is outside
gv_fetchfile(). This is all a bit academic since GvFILE_HEK should never
be null, but it at least it shuts up a compiler warning.
gv.h