summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-05 17:18:18 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-05 17:18:18 +0000
commit554b3ecafd2a8f619792c82298bc621b9e48a923 (patch)
treec3138e05a93a7e87ca8c5599d1f70fc3d0493a73 /pp.c
parentea61227d0482867af3a13c7e6042a17aac4b4d4f (diff)
downloadperl-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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 981e4889e2..866ddb0465 100644
--- a/pp.c
+++ b/pp.c
@@ -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 */