diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2003-02-07 10:57:43 +0100 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2003-02-11 08:14:29 +0000 |
commit | 4db098f469629e77d52348ce8cf58b861a065397 (patch) | |
tree | 821aa1e51403264703f60647f4feffb6f2dd3522 /sv.h | |
parent | 0e1e4930e43c3ea5f965d2a7d26e0fd2ab77ccd7 (diff) | |
download | perl-4db098f469629e77d52348ce8cf58b861a065397.tar.gz |
More code cleanup.
Subject: Re: New SV Flag
From: "H.Merijn Brand" <h.m.brand@hccnet.nl>
Message-Id: <20030207095258.6E05.H.M.BRAND@hccnet.nl>
p4raw-id: //depot/perl@18693
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -125,20 +125,17 @@ perform the upgrade if necessary. See C<svtype>. #define SvFLAGS(sv) (sv)->sv_flags #define SvREFCNT(sv) (sv)->sv_refcnt -#define ATOMIC_INC(count) (++count) -#define ATOMIC_DEC_AND_TEST(res, count) (res = (--count == 0)) - #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC) # define SvREFCNT_inc(sv) \ ({ \ SV *nsv = (SV*)(sv); \ if (nsv) \ - ATOMIC_INC(SvREFCNT(nsv)); \ + (SvREFCNT(nsv))++; \ nsv; \ }) #else # define SvREFCNT_inc(sv) \ - ((PL_Sv=(SV*)(sv)), (PL_Sv && ATOMIC_INC(SvREFCNT(PL_Sv))), (SV*)PL_Sv) + ((PL_Sv=(SV*)(sv)), (PL_Sv && ++(SvREFCNT(PL_Sv))), (SV*)PL_Sv) #endif #define SvREFCNT_dec(sv) sv_free((SV*)(sv)) |