diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-05 17:18:18 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-05 17:18:18 +0000 |
commit | 554b3ecafd2a8f619792c82298bc621b9e48a923 (patch) | |
tree | c3138e05a93a7e87ca8c5599d1f70fc3d0493a73 /pp.c | |
parent | ea61227d0482867af3a13c7e6042a17aac4b4d4f (diff) | |
download | perl-554b3ecafd2a8f619792c82298bc621b9e48a923.tar.gz |
Per-thread magicals mostly working (and localisable). Now getting
intermittent occasional "Use of uninitialized value" warnings
which may be due to some op flag black magic I've broken.
p4raw-id: //depot/perl@204
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4300,8 +4300,14 @@ PP(pp_specific) { #ifdef USE_THREADS dSP; - SV **svp = av_fetch(thr->specific, op->op_targ, TRUE); - XPUSHs(svp ? *svp : &sv_undef); + SV **svp = av_fetch(thr->magicals, op->op_targ, FALSE); + if (!svp) + croak("panic: pp_specific"); + EXTEND(sp, 1); + if (op->op_private & OPpLVAL_INTRO) + PUSHs(save_svref(svp)); + else + PUSHs(*svp); #else DIE("tried to access thread-specific data in non-threaded perl"); #endif /* USE_THREADS */ |