Permalink
Browse files

Stash (1.03): fix compilation for 5.8.8 and below: gv_fetchsv missing

  • Loading branch information...
1 parent 7e57cb5 commit ff102f0bc523cc4cf71a11a2d7d8ed55111cd431 @rurban committed Feb 3, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −0 Changes
  2. +1 −1 Stash/Stash.pm
  3. +5 −1 Stash/Stash.xs
View
1 Changes
@@ -9,6 +9,7 @@
Fix -u<module> 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
View
2 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
View
6 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)) {

0 comments on commit ff102f0

Please sign in to comment.