summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-03-28 18:40:44 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-03-28 18:40:44 +0000
commit11343788cbaaede18e3146b5219d2fbdaeaf516e (patch)
treeef2be09ece0508b3408a222a86980d39e20bcd42 /av.c
parenta4f68e9b64464684b732bc17fd65ed4a1aa4708c (diff)
downloadperl-11343788cbaaede18e3146b5219d2fbdaeaf516e.tar.gz
Initial 3-way merge from (5.001m, thr1m, 5.003) plus fixups.
p4raw-id: //depot/thrperl@4
Diffstat (limited to 'av.c')
-rw-r--r--av.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/av.c b/av.c
index b27ec762a6..5c240c7de8 100644
--- a/av.c
+++ b/av.c
@@ -30,8 +30,10 @@ AV* av;
while (key) {
sv = AvARRAY(av)[--key];
assert(sv);
- if (sv != &sv_undef)
+ if (sv != &sv_undef) {
+ dTHR;
(void)SvREFCNT_inc(sv);
+ }
}
AvREAL_on(av);
}
@@ -41,6 +43,7 @@ av_extend(av,key)
AV *av;
I32 key;
{
+ dTHR; /* only necessary if we have to extend stack */
if (key > AvMAX(av)) {
SV** ary;
I32 tmp;
@@ -131,6 +134,7 @@ I32 lval;
if (SvRMAGICAL(av)) {
if (mg_find((SV*)av,'P')) {
+ dTHR;
sv = sv_newmortal();
mg_copy((SV*)av, sv, 0, key);
Sv = sv;
@@ -196,6 +200,7 @@ SV *val;
ary = AvARRAY(av);
if (AvFILL(av) < key) {
if (!AvREAL(av)) {
+ dTHR;
if (av == stack && key > stack_sp - stack_base)
stack_sp = stack_base + key; /* XPUSH in disguise */
do