From: Nicholas Clark Date: Sat, 5 Nov 2005 16:47:31 +0000 (+0000) Subject: Make the 5.9 changes to B conditional on perl version. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=edcc7c74ed376a449c95af027d10cdeb74f64de8;p=p5sagit%2Fp5-mst-13.2.git Make the 5.9 changes to B conditional on perl version. p4raw-id: //depot/perl@26019 --- diff --git a/ext/B/B.pm b/ext/B/B.pm index 2346ac0..5b6c04e 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -7,7 +7,7 @@ # package B; -our $VERSION = '1.09'; +our $VERSION = '1.10'; use XSLoader (); require Exporter; @@ -855,6 +855,16 @@ IoIFP($io) == PerlIO_stdin() ). Like C, but takes an index as an argument to get only one element, rather than a list of all of them. +=item OFF + +This method is deprecated if running under Perl 5.8, and is no longer present +if running under Perl 5.9 + +=item AvFLAGS + +This method returns the AV specific flags. In Perl 5.9 these are now stored +in with the main SV flags, so this method is no longer present. + =back =head2 B::CV Methods @@ -907,6 +917,11 @@ For constant subroutines, returns the constant SV returned by the subroutine. =item ARRAY +=item PMROOT + +This method is not present if running under Perl 5.9, as the PMROOT +information is no longer stored directly in the hash. + =back =head2 OP-RELATED CLASSES diff --git a/ext/B/B.xs b/ext/B/B.xs index f9c8647..953f6be 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -1563,6 +1563,17 @@ SSize_t AvMAX(av) B::AV av +#if PERL_VERSION < 9 + + +#define AvOFF(av) ((XPVAV*)SvANY(av))->xof_off + +IV +AvOFF(av) + B::AV av + +#endif + void AvARRAY(av) B::AV av @@ -1584,6 +1595,16 @@ AvARRAYelt(av, idx) else XPUSHs(make_sv_object(aTHX_ sv_newmortal(), NULL)); +#if PERL_VERSION < 9 + +MODULE = B PACKAGE = B::AV + +U8 +AvFLAGS(av) + B::AV av + +#endif + MODULE = B PACKAGE = B::FM PREFIX = Fm IV @@ -1682,6 +1703,14 @@ char * HvNAME(hv) B::HV hv +#if PERL_VERSION < 9 + +B::PMOP +HvPMROOT(hv) + B::HV hv + +#endif + void HvARRAY(hv) B::HV hv