diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-11 15:20:43 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-11 15:20:43 +0000 |
commit | 2faa37ccf8e46b865687f0ab4992b29a75eb79ea (patch) | |
tree | 39119f36375c3511f7e95acb160221c4f3b066ea /perl.c | |
parent | 38a03e6ea6b9b346c41b9006fbeedc3b0f0130b2 (diff) | |
download | perl-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.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 */ |