diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-04-07 17:14:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-04-07 17:14:11 +0000 |
commit | fc97af9c8f85fe5d98c1be12130f8f74fe27a7bf (patch) | |
tree | 5f6c66f13e0fb0c6a32878de6fff94308039b0eb /op.h | |
parent | 51e4e64df3bc05a7c291521c55c2654beda56c26 (diff) | |
download | perl-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.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |