X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pad.c;h=0c00cfff6b0c2488676fd77270871a49057edcbc;hb=b34c0dd4a7081ed822e2197d6a723d2ab2fdfc86;hp=0b0491c640fb2f300e37fd9b4579b73a3d71ed33;hpb=e1f795dc699c88c2d9eb4a46fe629483760393c2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pad.c b/pad.c index 0b0491c..0c00cff 100644 --- a/pad.c +++ b/pad.c @@ -22,6 +22,11 @@ /* =head1 Pad Data Structures +This file contains the functions that create and manipulate scratchpads, +which are array-of-array data structures attached to a CV (ie a sub) +and which store lexical variables and opcode temporary and per-thread +values. + =for apidoc m|AV *|CvPADLIST|CV *cv CV's can have CvPADLIST(cv) set to point to an AV. @@ -588,7 +593,7 @@ Perl_pad_findmy(pTHX_ char *name) */ PADOFFSET -Perl_find_rundefsvoffset() +Perl_find_rundefsvoffset(pTHX) { SV *out_sv; int out_flags; @@ -1405,7 +1410,9 @@ Perl_cv_clone(pTHX_ CV *proto) #endif CvGV(cv) = CvGV(proto); CvSTASH(cv) = CvSTASH(proto); + OP_REFCNT_LOCK; CvROOT(cv) = OpREFCNT_inc(CvROOT(proto)); + OP_REFCNT_UNLOCK; CvSTART(cv) = CvSTART(proto); CvOUTSIDE(cv) = (CV*)SvREFCNT_inc(outside); CvOUTSIDE_SEQ(cv) = CvOUTSIDE_SEQ(proto);