diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-21 18:28:22 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-21 18:28:22 +0000 |
commit | 54b9620dd49f76536ba0792f6f471615a414bd6a (patch) | |
tree | 0f7080854c047d90b09822aec3b81dd2fcbabd89 /util.c | |
parent | ff2faa2b5a0809a5124aa90fc1d07503e49a73fb (diff) | |
download | perl-54b9620dd49f76536ba0792f6f471615a414bd6a.tar.gz |
$_ is now per-thread (rather a lot of changes). Only tested under
*-linux-thread at the moment.
p4raw-id: //depot/perl@274
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -2465,7 +2465,7 @@ new_struct_thread(struct thread *t) curcop = &compiling; thr->cvcache = newHV(); - thr->magicals = newAV(); + thr->threadsv = newAV(); thr->specific = newAV(); thr->errsv = newSVpv("", 0); thr->errhv = newHV(); @@ -2506,16 +2506,15 @@ new_struct_thread(struct thread *t) bodytarget = newSVsv(t->Tbodytarget); toptarget = newSVsv(t->Ttoptarget); - /* Initialise all per-thread magicals that the template thread used */ - svp = AvARRAY(t->magicals); - for (i = 0; i <= AvFILL(t->magicals); i++, svp++) { + /* Initialise all per-thread SVs that the template thread used */ + svp = AvARRAY(t->threadsv); + for (i = 0; i <= AvFILL(t->threadsv); i++, svp++) { if (*svp && *svp != &sv_undef) { SV *sv = newSVsv(*svp); - av_store(thr->magicals, i, sv); - sv_magic(sv, 0, 0, &per_thread_magicals[i], 1); + av_store(thr->threadsv, i, sv); + sv_magic(sv, 0, 0, &threadsv_names[i], 1); DEBUG_L(PerlIO_printf(PerlIO_stderr(), - "new_struct_thread: copied magical %d %p->%p\n",i, - t, thr)); + "new_struct_thread: copied threadsv %d %p->%p\n",i, t, thr)); } } |