diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-07 01:37:28 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-07 01:37:28 +0000 |
commit | e77eedc24c0252a902559034f2aa207f216529cc (patch) | |
tree | d59ef6c28b87613607887003bd9d900644335b67 /sv.h | |
parent | 4e35701fd273ba8d0093a29660dee38a92408e9b (diff) | |
parent | 5756a3ac9bce8d31d81b13d0e57cdc87e2565fe4 (diff) | |
download | perl-e77eedc24c0252a902559034f2aa207f216529cc.tar.gz |
Raw integrate of latest perl
p4raw-id: //depot/ansiperl@208
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -71,13 +71,16 @@ struct io { #define SvANY(sv) (sv)->sv_any #define SvFLAGS(sv) (sv)->sv_flags -#define SvREFCNT(sv) (sv)->sv_refcnt -#ifdef CRIPPLED_CC -#define SvREFCNT_inc(sv) sv_newref((SV*)sv) -#define SvREFCNT_dec(sv) sv_free((SV*)sv) +#ifdef __GNUC__ +# define SvREFCNT_inc(sv) ({SV* nsv=(SV*)(sv); if(nsv) ++SvREFCNT(nsv); nsv;}) #else -#define SvREFCNT_inc(sv) ((Sv = (SV*)(sv)), \ - (Sv && ++SvREFCNT(Sv)), (SV*)Sv) +# if defined(CRIPPLED_CC) || defined(USE_THREADS) +# define SvREFCNT_inc(sv) sv_newref((SV*)sv) +# else +# define SvREFCNT_inc(sv) ((Sv=(SV*)(sv)), (Sv && ++SvREFCNT(Sv)), (SV*)Sv) +# endif +#endif + #define SvREFCNT_dec(sv) sv_free((SV*)sv) #endif |