summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-02-10 13:21:37 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-02-12 03:09:58 +0000
commitf46d017c815b0d11f074ad6c16247c01f8af2ece (patch)
treeb47db1bbab27e93a3f24e5114c769c4c8ebe7351 /scope.h
parent301d9039fb19ffce344369e333240632e80d95d5 (diff)
downloadperl-f46d017c815b0d11f074ad6c16247c01f8af2ece.tar.gz
[win32] fix extra LEAVE when require fails
Message-Id: <199802102321.SAA15346@aatma.engin.umich.edu> Subject: Re: evals and requires make seg-fault with bad require file p4raw-id: //depot/win32/perl@498
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/scope.h b/scope.h
index 4648d00071..44bc43567a 100644
--- a/scope.h
+++ b/scope.h
@@ -39,8 +39,23 @@
#define SAVETMPS save_int((int*)&tmps_floor), tmps_floor = tmps_ix
#define FREETMPS if (tmps_ix > tmps_floor) free_tmps()
+#ifdef DEBUGGING
+#define ENTER \
+ STMT_START { \
+ push_scope(); \
+ DEBUG_l(deb("ENTER scope %ld at %s:%d\n", \
+ scopestack_ix, __FILE__, __LINE__)); \
+ } STMT_END
+#define LEAVE \
+ STMT_START { \
+ DEBUG_l(deb("LEAVE scope %ld at %s:%d\n", \
+ scopestack_ix, __FILE__, __LINE__)); \
+ pop_scope(); \
+ } STMT_END
+#else
#define ENTER push_scope()
#define LEAVE pop_scope()
+#endif
#define LEAVE_SCOPE(old) if (savestack_ix > old) leave_scope(old)
/*