Skip to content

Commit

Permalink
Stash (1.03): fix compilation for 5.8.8 and below: gv_fetchsv missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Feb 13, 2012
1 parent 7e57cb5 commit ff102f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Stash/Stash.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stash.pm -- show what stashes are loaded
package B::Stash;

our $VERSION = '1.02';
our $VERSION = '1.03';

=pod
Expand Down
6 changes: 5 additions & 1 deletion Stash/Stash.xs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ff102f0

Please sign in to comment.