diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-08-23 08:29:09 +0300 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-08-23 01:30:46 +0000 |
commit | a22cf6270c3177e6e3d5b286c4478779868634a0 (patch) | |
tree | 8112535ec53f898d95a85ef6d18a9e7b8f88964b /ext/Devel | |
parent | 5faea5d5ca85f96c20a763c619928a44d6a9303f (diff) | |
download | perl-a22cf6270c3177e6e3d5b286c4478779868634a0.tar.gz |
PPPort IVSIZE and SvPV_nolen
Message-Id: <20020823022909.GC9135@lyta.hut.fi>
p4raw-id: //depot/perl@17760
Diffstat (limited to 'ext/Devel')
-rw-r--r-- | ext/Devel/PPPort/PPPort.pm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index 1b4d585385..b426fd20ab 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 */ |