}
static PADOFFSET
+#ifndef CAN_PROTOTYPE
pad_findlex(name, newoff, seq, startcv, cx_ix)
char *name;
PADOFFSET newoff;
I32 seq;
CV* startcv;
I32 cx_ix;
+#else
+pad_findlex(char *name, PADOFFSET newoff, I32 seq, CV* startcv, I32 cx_ix)
+#endif
{
CV *cv;
I32 off;
}
SvREFCNT_dec(CvGV(cv));
CvGV(cv) = Nullgv;
+ SvREFCNT_dec(CvOUTSIDE(cv));
+ CvOUTSIDE(cv) = Nullcv;
LEAVE;
}
}
CvSTASH(cv) = CvSTASH(proto);
CvROOT(cv) = CvROOT(proto);
CvSTART(cv) = CvSTART(proto);
- CvOUTSIDE(cv) = CvOUTSIDE(proto);
+ if (CvOUTSIDE(proto))
+ CvOUTSIDE(cv) = (CV*)SvREFCNT_inc((SV*)CvOUTSIDE(proto));
comppad = newAV();
SvREFCNT_dec(CvGV(cv));
}
CvOUTSIDE(cv) = CvOUTSIDE(compcv);
+ CvOUTSIDE(compcv) = 0;
CvPADLIST(cv) = CvPADLIST(compcv);
SvREFCNT_dec(compcv);
}
fprintf(stderr, " FILEGV = 0x%lx\n", (long)CvFILEGV(sv));
fprintf(stderr, " DEPTH = %ld\n", (long)CvDEPTH(sv));
fprintf(stderr, " PADLIST = 0x%lx\n", (long)CvPADLIST(sv));
+ fprintf(stderr, " OUTSIDE = 0x%lx\n", (long)CvOUTSIDE(sv));
if (type == SVt_PVFM)
fprintf(stderr, " LINES = %ld\n", (long)FmLINES(sv));
break;
CV* outsidecv = compcv;
AV* comppadlist;
+ if (compcv) {
+ assert(SvTYPE(compcv) == SVt_PVCV);
+ }
save_I32(&subline);
save_item(subname);
SAVEINT(padix);
av_store(comppadlist, 1, SvREFCNT_inc((SV*)comppad));
CvPADLIST(compcv) = comppadlist;
- CvOUTSIDE(compcv) = outsidecv;
+ CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc((SV*)outsidecv);
return oldsavestack_ix;
}