summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-11-12 14:31:43 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-11-12 16:25:36 +0100
commitd343c3ef4538135207ab69cd65d1bb1ef5403ccc (patch)
tree1993aef1b199c1df713033677bb02fdac2e8dfd5 /scope.c
parentaf24cc9d0ee84635a0e9165232ec7b091c4596f3 (diff)
downloadperl-d343c3ef4538135207ab69cd65d1bb1ef5403ccc.tar.gz
Add ENTER_with_name and LEAVE_with_name to automaticly check for matching ENTER/LEAVE when debugging is enabled
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 1d5701e8b9..5da2554292 100644
--- a/scope.c
+++ b/scope.c
@@ -91,7 +91,13 @@ Perl_push_scope(pTHX)
if (PL_scopestack_ix == PL_scopestack_max) {
PL_scopestack_max = GROW(PL_scopestack_max);
Renew(PL_scopestack, PL_scopestack_max, I32);
+#ifdef DEBUGGING
+ Renew(PL_scopestack_name, PL_scopestack_max, const char*);
+#endif DEBUGGING
}
+#ifdef DEBUGGING
+ PL_scopestack_name[PL_scopestack_ix] = "unknown";
+#endif
PL_scopestack[PL_scopestack_ix++] = PL_savestack_ix;
}