diff --git a/Changes b/Changes index 33f2ddbd8..913c47eb9 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,7 @@ Fix -u without file extension. * t/perldoc.t: perlcc fails with 5.8 because Cwd disturbs the fragile method package finder for File::Spec. Use cc_harness. + * Stash (1.03): fix compilation for 5.8.8 and below: gv_fetchsv missing 1.42 2012-02-01 rurban * C: Improved finding methods in parent classes, visible by the diff --git a/Stash/Stash.pm b/Stash/Stash.pm index a4851d517..5e5a17837 100644 --- a/Stash/Stash.pm +++ b/Stash/Stash.pm @@ -1,7 +1,7 @@ # Stash.pm -- show what stashes are loaded package B::Stash; -our $VERSION = '1.02'; +our $VERSION = '1.03'; =pod diff --git a/Stash/Stash.xs b/Stash/Stash.xs index bd5146168..cdd79b9d8 100644 --- a/Stash/Stash.xs +++ b/Stash/Stash.xs @@ -12,11 +12,15 @@ CvIsXSUB(cvname) SV* cvname; CODE: CV *cv; +#if PERL_VERSION < 8 || ((PERL_VERSION == 8) && (PERL_SUBVERSION < 9)) + GV *const gv = gv_fetchpv(SvPVX(cvname), 0, SVt_PVCV); +#else GV *const gv = gv_fetchsv(cvname, 0, SVt_PVCV); +#endif RETVAL = FALSE; if (gv && (cv = GvCV(gv))) { if (CvXSUB(cv)) { -#if PERLVERSION < 7 +#if PERL_VERSION < 7 RETVAL = TRUE; #else if (!(CvFLAGS(cv) & CVf_CONST) || (CvFLAGS(cv) & CVf_ANON)) {