summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-11 15:20:43 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-11 15:20:43 +0000
commit2faa37ccf8e46b865687f0ab4992b29a75eb79ea (patch)
tree39119f36375c3511f7e95acb160221c4f3b066ea /perl.c
parent38a03e6ea6b9b346c41b9006fbeedc3b0f0130b2 (diff)
downloadperl-2faa37ccf8e46b865687f0ab4992b29a75eb79ea.tar.gz
Change name of OP_SPECIFIC to OP_THREADSV. Fixed perl_get_sv when
getting per-thread magicals. Fixed thr->errsv initialisation. p4raw-id: //depot/perl@229
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl.c b/perl.c
index dce37a4a5f..3f30f6d63a 100644
--- a/perl.c
+++ b/perl.c
@@ -1086,14 +1086,17 @@ perl_get_sv(name, create)
char* name;
I32 create;
{
+ GV *gv;
#ifdef USE_THREADS
- PADOFFSET tmp;
- if (name[1] == '\0' && !isALPHA(name[0])
- && (tmp = find_thread_magical(name)) != NOT_IN_PAD) {
- return *av_fetch(thr->magicals, tmp, FALSE);
+ if (name[1] == '\0' && !isALPHA(name[0])) {
+ PADOFFSET tmp = find_thread_magical(name);
+ if (tmp != NOT_IN_PAD) {
+ dTHR;
+ return *av_fetch(thr->magicals, tmp, FALSE);
+ }
}
#endif /* USE_THREADS */
- GV* gv = gv_fetchpv(name, create, SVt_PV);
+ gv = gv_fetchpv(name, create, SVt_PV);
if (gv)
return GvSV(gv);
return Nullsv;
@@ -2846,7 +2849,6 @@ init_main_thread()
thr->cvcache = newHV();
thr->magicals = newAV();
thr->specific = newAV();
- thr->errsv = newSVpv("", 0);
thr->errhv = newHV();
thr->flags = THRf_R_JOINABLE;
MUTEX_INIT(&thr->mutex);
@@ -2889,6 +2891,7 @@ init_main_thread()
sv_upgrade(bodytarget, SVt_PVFM);
sv_setpvn(bodytarget, "", 0);
formtarget = bodytarget;
+ thr->errsv = newSVpv("", 0);
return thr;
}
#endif /* USE_THREADS */