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.c | |
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.c')
-rw-r--r-- | sv.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -5398,7 +5398,7 @@ SV * Perl_sv_newref(pTHX_ SV *sv) { if (sv) - ATOMIC_INC(SvREFCNT(sv)); + (SvREFCNT(sv))++; return sv; } @@ -5416,8 +5416,6 @@ Normally called via a wrapper macro C<SvREFCNT_dec>. void Perl_sv_free(pTHX_ SV *sv) { - int refcount_is_zero; - if (!sv) return; if (SvREFCNT(sv) == 0) { @@ -5436,8 +5434,7 @@ Perl_sv_free(pTHX_ SV *sv) Perl_warner(aTHX_ packWARN(WARN_INTERNAL), "Attempt to free unreferenced scalar"); return; } - ATOMIC_DEC_AND_TEST(refcount_is_zero, SvREFCNT(sv)); - if (!refcount_is_zero) + if (--(SvREFCNT(sv)) > 0) return; #ifdef DEBUGGING if (SvTEMP(sv)) { |