summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-07 17:14:11 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-07 17:14:11 +0000
commitfc97af9c8f85fe5d98c1be12130f8f74fe27a7bf (patch)
tree5f6c66f13e0fb0c6a32878de6fff94308039b0eb /op.h
parent51e4e64df3bc05a7c291521c55c2654beda56c26 (diff)
downloadperl-fc97af9c8f85fe5d98c1be12130f8f74fe27a7bf.tar.gz
Under PERL_DEBUG_READONLY_OPS don't panic if you can't find the slab
being freed. Also, need to set the slab to read/write before incrementing or decrementing an op's reference count. With this we can build all extentions, and run test_harness. p4raw-id: //depot/perl@30867
Diffstat (limited to 'op.h')
-rw-r--r--op.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/op.h b/op.h
index 2141e2b496..2631fa8228 100644
--- a/op.h
+++ b/op.h
@@ -590,8 +590,13 @@ struct loop {
#endif
#define OpREFCNT_set(o,n) ((o)->op_targ = (n))
-#define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : NULL)
-#define OpREFCNT_dec(o) (--(o)->op_targ)
+#ifdef PERL_DEBUG_READONLY_OPS
+# define OpREFCNT_inc(o) Perl_op_refcnt_inc(aTHX_ o)
+# define OpREFCNT_dec(o) Perl_op_refcnt_dec(aTHX_ o)
+#else
+# define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : NULL)
+# define OpREFCNT_dec(o) (--(o)->op_targ)
+#endif
/* flags used by Perl_load_module() */
#define PERL_LOADMOD_DENY 0x1