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 /perl.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 'perl.c')
-rw-r--r-- | perl.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -138,7 +138,6 @@ register PerlInterpreter *sv_interp; COND_INIT(&eval_cond); MUTEX_INIT(&threads_mutex); COND_INIT(&nthreads_cond); - MUTEX_INIT(&keys_mutex); thr = new_struct_thread(0); #endif /* USE_THREADS */ @@ -210,9 +209,6 @@ register PerlInterpreter *sv_interp; fdpid = newAV(); /* for remembering popen pids by fd */ - for (i = 0; i < N_PER_THREAD_MAGICALS; i++) - magical_keys[i] = NOT_IN_PAD; - keys = newSVpv("", 0); init_stacks(ARGS); DEBUG( { New(51,debname,128,char); @@ -973,7 +969,7 @@ print \" \\@INC:\\n @INC\\n\";"); SvREFCNT_dec(rs); rs = SvREFCNT_inc(nrs); #ifdef USE_THREADS - sv_setsv(*av_fetch(thr->specific, find_thread_magical("/"), TRUE), rs); + sv_setsv(*av_fetch(thr->magicals, find_thread_magical("/"), FALSE), rs); #else sv_setsv(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), rs); #endif /* USE_THREADS */ @@ -2546,7 +2542,7 @@ init_predump_symbols() GV *othergv; #ifdef USE_THREADS - sv_setpvn(*av_fetch(thr->specific,find_thread_magical("\""),TRUE), " ", 1); + sv_setpvn(*av_fetch(thr->magicals,find_thread_magical("\""),FALSE)," ", 1); #else sv_setpvn(GvSV(gv_fetchpv("\"", TRUE, SVt_PV)), " ", 1); #endif /* USE_THREADS */ @@ -2848,21 +2844,20 @@ AV* list; JMPENV_PUSH(ret); switch (ret) { case 0: { - SV* atsv = sv_mortalcopy(errsv); PUSHMARK(stack_sp); perl_call_sv((SV*)cv, G_EVAL|G_DISCARD); - (void)SvPV(atsv, len); + (void)SvPV(errsv, len); if (len) { JMPENV_POP; curcop = &compiling; curcop->cop_line = oldline; if (list == beginav) - sv_catpv(atsv, "BEGIN failed--compilation aborted"); + sv_catpv(errsv, "BEGIN failed--compilation aborted"); else - sv_catpv(atsv, "END failed--cleanup aborted"); + sv_catpv(errsv, "END failed--cleanup aborted"); while (scopestack_ix > oldscope) LEAVE; - croak("%s", SvPVX(atsv)); + croak("%s", SvPVX(errsv)); } } break; |