From: Jarkko Hietaniemi Date: Fri, 23 Aug 2002 05:29:09 +0000 (+0300) Subject: PPPort IVSIZE and SvPV_nolen X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a22cf6270c3177e6e3d5b286c4478779868634a0;p=p5sagit%2Fp5-mst-13.2.git PPPort IVSIZE and SvPV_nolen Message-Id: <20020823022909.GC9135@lyta.hut.fi> p4raw-id: //depot/perl@17760 --- diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index 1b4d585..b426fd2 100644 --- a/ext/Devel/PPPort/PPPort.pm +++ b/ext/Devel/PPPort/PPPort.pm @@ -434,6 +434,15 @@ __DATA__ # define aTHX_ #endif +/* IV could also be a quad (say, a long long), but Perls + * capable of those should have IVSIZE already. */ +#if !defined(IVSIZE) && defined(LONGSIZE) +# define IVSIZE LONGSIZE +#endif +#ifndef IVSIZE +# define IVSIZE 4 /* A bold guess, but the best we can make. */ +#endif + #ifndef UVSIZE # define UVSIZE IVSIZE #endif @@ -649,7 +658,6 @@ SV *sv; #else /* single interpreter */ - #define START_MY_CXT static my_cxt_t my_cxt; #define dMY_CXT_SV dNOOP #define dMY_CXT dNOOP @@ -720,6 +728,18 @@ SV *sv; # define SvPVbyte SvPV #endif +#ifndef SvPV_nolen +# define SvPV_nolen(sv) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX(sv) : sv_2pv_nolen(sv)) + static char * + sv_2pv_nolen(pTHX_ register SV *sv) + { + STRLEN n_a; + return sv_2pv(sv, &n_a); + } +#endif + #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */