ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Devel-FindRef/FindRef.xs
(Generate patch)

Comparing Devel-FindRef/FindRef.xs (file contents):
Revision 1.23 by root, Fri May 16 06:41:37 2014 UTC vs.
Revision 1.25 by root, Sun May 18 18:44:08 2014 UTC

107 { 107 {
108 /* I have no clue what this is */ 108 /* I have no clue what this is */
109 /* maybe some placeholder for our variables for eval? */ 109 /* maybe some placeholder for our variables for eval? */
110 /* it doesn't seem to reference anything, so we should be able to ignore it */ 110 /* it doesn't seem to reference anything, so we should be able to ignore it */
111 } 111 }
112 else 112 else if (SvMAGICAL (sv)) /* name-pads use SvMAGIC for other purposes */
113 { 113 {
114 MAGIC *mg = SvMAGIC (sv); 114 MAGIC *mg = SvMAGIC (sv);
115 115
116 while (mg) 116 while (mg)
117 { 117 {
156 156
157 break; 157 break;
158 158
159 case SVt_PVCV: 159 case SVt_PVCV:
160 { 160 {
161 int depth = CvDEPTH (sv); 161 PADLIST *padlist = CvPADLIST (sv);
162 162
163 /* Anonymous subs have a padlist but zero depth */
164 if (CvANON (sv) && !depth && CvPADLIST (sv))
165 depth = 1;
166
167 if (depth) 163 if (padlist)
168 { 164 {
169 PADLIST *padlist = CvPADLIST (sv); 165 int depth = CvDEPTH (sv);
166
167 /* Anonymous subs have a padlist but zero depth */
168 /* some hacks switch CvANON off, so we just blindly assume a minimum of 1 */
169 if (!depth)
170 depth = 1;
170 171
171 while (depth) 172 while (depth)
172 { 173 {
173 PAD *pad = PadlistARRAY (padlist)[depth]; 174 PAD *pad = PadlistARRAY (padlist)[depth];
174 175

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines