summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-02 19:03:55 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-02 19:03:55 +0000
commitf1fac472816f68ec1eac2f84892d78b65a4598fb (patch)
tree5cdd155ab3819ec7d264f9e5b5d12af70460adf4 /intrpvar.h
parent73c71df6a9051c0d8926b8aae2d513c596501d60 (diff)
downloadperl-f1fac472816f68ec1eac2f84892d78b65a4598fb.tar.gz
Add a new compile option PERL_DEBUG_READONLY_OPS which marks the optree
as read only (or as much of it as it practical). This makes it trivial to detect buggy code that is modifying the optree at runtime. p4raw-id: //depot/perl@30829
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index a8d81311f2..4d19b98ee0 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -527,6 +527,11 @@ PERLVARI(Iutf8cache, I8, -1) /* Is the utf8 caching code enabled? */
PERLVARI(Iutf8cache, I8, 1) /* Is the utf8 caching code enabled? */
#endif
+#ifdef PERL_DEBUG_READONLY_OPS
+PERLVARI(Islabs, I32**, NULL) /* Array of slabs that have been allocated */
+PERLVARI(Islab_count, U32, 0) /* Size of the array */
+#endif
+
/* New variables must be added to the very end, before this comment,
* for binary compatibility (the offsets of the old members must not change).
* (Don't forget to add your variable also to perl_clone()!)