diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-06 14:31:38 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-06 14:31:38 +0000 |
commit | 199100c871a030cc44240072644abe9aab66bc02 (patch) | |
tree | b88def55f8e42b978120f498a2e4197260d5db23 /sv.h | |
parent | 554b3ecafd2a8f619792c82298bc621b9e48a923 (diff) | |
download | perl-199100c871a030cc44240072644abe9aab66bc02.tar.gz |
Per-thread magicals now stored in their own thr->magicals and keyed
more directly. cvcache and oursv become ordinary struct thread
fields instead of #defined thr->Tfoo ones. SvREFCNT_inc now checks
for 0 again. Main thread initialisation done by new function
init_main_thread instead of (now fixed) new_struct_thread.
p4raw-id: //depot/perl@205
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,12 +73,12 @@ struct io { #define SvREFCNT(sv) (sv)->sv_refcnt #ifdef __GNUC__ -# define SvREFCNT_inc(sv) ({SV *nsv = (SV*)(sv); ++SvREFCNT(nsv); nsv;}) +# define SvREFCNT_inc(sv) ({SV* nsv=(SV*)(sv); if(nsv) ++SvREFCNT(nsv); nsv;}) #else # if defined(CRIPPLED_CC) || defined(USE_THREADS) -# define SvREFCNT_inc(sv) sv_newref((SV*)sv) +# define SvREFCNT_inc(sv) sv_newref((SV*)sv) # else -# define SvREFCNT_inc(sv) ((Sv = (SV*)(sv)), ++SvREFCNT(Sv), (SV*)Sv) +# define SvREFCNT_inc(sv) ((Sv=(SV*)(sv)), (Sv && ++SvREFCNT(Sv)), (SV*)Sv) # endif #endif |