summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-07-18 20:50:26 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-07-18 20:50:26 +0000
commit62a559b8665e0cfb74dd6a69c48e22412fbdf175 (patch)
tree99a5701cb5373bb2618f4e40af79056304e8bfe3
parent954eb2b583d25fd9ce5047f2c3b685b640f18bd7 (diff)
parentf7ac0805bb97e1e2d7fa37a2ffc86ce9bd5c6350 (diff)
downloadperl-62a559b8665e0cfb74dd6a69c48e22412fbdf175.tar.gz
Merge latest mainline
p4raw-id: //depot/ansiperl@1536
-rw-r--r--ext/Thread/Thread.xs40
-rw-r--r--op.h10
-rw-r--r--patchlevel.h1
-rw-r--r--util.c24
4 files changed, 45 insertions, 30 deletions
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs
index 30ccaf47bf..f61a927bcd 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -150,21 +150,31 @@ threadstart(void *arg)
SvREFCNT_dec(thr->errsv);
SvREFCNT_dec(thr->errhv);
- Safefree(PL_markstack);
- Safefree(PL_scopestack);
- Safefree(PL_savestack);
- Safefree(PL_retstack);
- Safefree(cxstack);
- Safefree(PL_tmps_stack);
- Safefree(PL_ofs);
-
- SvREFCNT_dec(PL_rs);
- SvREFCNT_dec(PL_nrs);
- SvREFCNT_dec(PL_statname);
- Safefree(PL_screamfirst);
- Safefree(PL_screamnext);
- Safefree(PL_reg_start_tmp);
- SvREFCNT_dec(PL_lastscream);
+ /*Safefree(cxstack);*/
+ while (curstackinfo->si_next)
+ curstackinfo = curstackinfo->si_next;
+ while (curstackinfo) {
+ PERL_SI *p = curstackinfo->si_prev;
+ SvREFCNT_dec(curstackinfo->si_stack);
+ Safefree(curstackinfo->si_cxstack);
+ Safefree(curstackinfo);
+ curstackinfo = p;
+ }
+ Safefree(markstack);
+ Safefree(scopestack);
+ Safefree(savestack);
+ Safefree(retstack);
+ Safefree(tmps_stack);
+ Safefree(ofs);
+
+ SvREFCNT_dec(rs);
+ SvREFCNT_dec(nrs);
+ SvREFCNT_dec(statname);
+ Safefree(screamfirst);
+ Safefree(screamnext);
+ Safefree(reg_start_tmp);
+ SvREFCNT_dec(lastscream);
+ /*SvREFCNT_dec(defoutgv);*/
MUTEX_LOCK(&thr->mutex);
DEBUG_L(PerlIO_printf(PerlIO_stderr(),
diff --git a/op.h b/op.h
index 0161110cb5..75e674e143 100644
--- a/op.h
+++ b/op.h
@@ -81,10 +81,14 @@ typedef U32 PADOFFSET;
/* On OP_ENTERITER, loop var is per-thread */
/* old names; don't use in new code, but don't break them, either */
-#define OPf_LIST 1
-#define OPf_KNOW 2
+#define OPf_LIST OPf_WANT_LIST
+#define OPf_KNOW OPf_WANT
#define GIMME \
- (PL_op->op_flags & OPf_KNOW ? PL_op->op_flags & OPf_LIST : dowantarray())
+ (PL_op->op_flags & OPf_WANT \
+ ? ((PL_op->op_flags & OPf_WANT) == OPf_WANT_LIST \
+ ? G_ARRAY \
+ : G_SCALAR) \
+ : dowantarray())
/* Private for lvalues */
#define OPpLVAL_INTRO 128 /* Lvalue must be localized */
diff --git a/patchlevel.h b/patchlevel.h
index e46a9f4b1e..6c584bbed9 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -40,6 +40,7 @@
static char *local_patches[] = {
NULL
,"DEVEL_BETA_ISSUE_1 - 5.005 Public Beta, Issue 1"
+ ,"PL_ prefix on vars"
,NULL
};
diff --git a/util.c b/util.c
index 9e542296bb..19487d3679 100644
--- a/util.c
+++ b/util.c
@@ -2780,18 +2780,18 @@ new_struct_thread(struct perl_thread *t)
PL_in_eval = FALSE;
PL_restartop = 0;
- PL_tainted = t->Ttainted;
- PL_curpm = t->Tcurpm; /* XXX No PMOP ref count */
- PL_nrs = newSVsv(t->Tnrs);
- PL_rs = SvREFCNT_inc(PL_nrs);
- PL_last_in_gv = (GV*)SvREFCNT_inc(t->Tlast_in_gv);
- PL_ofslen = t->Tofslen;
- PL_ofs = savepvn(t->Tofs, PL_ofslen);
- PL_defoutgv = (GV*)SvREFCNT_inc(t->Tdefoutgv);
- PL_chopset = t->Tchopset;
- PL_formtarget = newSVsv(t->Tformtarget);
- PL_bodytarget = newSVsv(t->Tbodytarget);
- PL_toptarget = newSVsv(t->Ttoptarget);
+ tainted = t->Ttainted;
+ curpm = t->Tcurpm; /* XXX No PMOP ref count */
+ nrs = newSVsv(t->Tnrs);
+ rs = SvREFCNT_inc(nrs);
+ last_in_gv = Nullgv;
+ ofslen = t->Tofslen;
+ ofs = savepvn(t->Tofs, ofslen);
+ defoutgv = (GV*)SvREFCNT_inc(t->Tdefoutgv);
+ chopset = t->Tchopset;
+ formtarget = newSVsv(t->Tformtarget);
+ bodytarget = newSVsv(t->Tbodytarget);
+ toptarget = newSVsv(t->Ttoptarget);
PL_statname = NEWSV(66,0);
PL_maxscream = -1;