Change 32949 by [EMAIL PROTECTED] on 2008/01/11 11:31:34
Introduce macro PERL_MAX_SUB_DEPTH
Affected files ...
... //depot/perl/perl.h#820 edit
... //depot/perl/pp_ctl.c#655 edit
... //depot/perl/pp_hot.c#552 edit
Differences ...
==== //depot/perl/perl.h#820 (text) ====
Index: perl/perl.h
--- perl/perl.h#819~32948~ 2008-01-11 02:42:13.000000000 -0800
+++ perl/perl.h 2008-01-11 03:31:34.000000000 -0800
@@ -919,6 +919,11 @@
#define PERL_ARENA_SIZE 4080
#endif
+/* Maximum level of recursion */
+#ifndef PERL_MAX_SUB_DEPTH
+#define PERL_MAX_SUB_DEPTH 100
+#endif
+
#endif /* PERL_CORE */
/* We no longer default to creating a new SV for GvSV.
==== //depot/perl/pp_ctl.c#655 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#654~32922~ 2008-01-09 08:52:36.000000000 -0800
+++ perl/pp_ctl.c 2008-01-11 03:31:34.000000000 -0800
@@ -2427,7 +2427,7 @@
if (CvDEPTH(cv) < 2)
SvREFCNT_inc_simple_void_NN(cv);
else {
- if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION))
+ if (CvDEPTH(cv) == PERL_MAX_SUB_DEPTH &&
ckWARN(WARN_RECURSION))
sub_crush_depth(cv);
pad_push(padlist, CvDEPTH(cv));
}
==== //depot/perl/pp_hot.c#552 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#551~32915~ 2008-01-09 04:33:27.000000000 -0800
+++ perl/pp_hot.c 2008-01-11 03:31:34.000000000 -0800
@@ -2830,7 +2830,7 @@
* stuff so that __WARN__ handlers can safely dounwind()
* if they want to
*/
- if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
+ if (CvDEPTH(cv) == PERL_MAX_SUB_DEPTH && ckWARN(WARN_RECURSION)
&& !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
sub_crush_depth(cv);
#if 0
End of Patch.