summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-12-17 17:17:34 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-18 16:06:38 +0000
commit6a3d5e3dbfbb290a39e3787450653a41f07f3b5d (patch)
tree919cbe41888dfb8fb191c942adddf029b56ae7a7 /op.c
parentc38a65302a7e2e2ea9b8748d368c87d573add6fd (diff)
downloadperl-6a3d5e3dbfbb290a39e3787450653a41f07f3b5d.tar.gz
Re: [PATCH] do not meddle in the affairs of PERL_TRACK_MEMPOOL
Message-ID: <4586084E.8040706@iki.fi> Introduce CopLABEL() macro to deal with labels attached to COPs. p4raw-id: //depot/perl@29585
Diffstat (limited to 'op.c')
-rw-r--r--op.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/op.c b/op.c
index 2ed219811e..2c10b2b5a3 100644
--- a/op.c
+++ b/op.c
@@ -514,19 +514,7 @@ clear_pmop:
STATIC void
S_cop_free(pTHX_ COP* cop)
{
- if (cop->cop_label) {
-#ifdef PERL_TRACK_MEMPOOL
- Malloc_t ptr = (Malloc_t)(cop->cop_label - sTHX);
- struct perl_memory_debug_header *const header
- = (struct perl_memory_debug_header *)ptr;
- /* Only the thread that allocated us can free us. */
- if (header->interpreter == aTHX)
-#endif
- {
- Safefree(cop->cop_label);
- cop->cop_label = NULL;
- }
- }
+ CopLABEL_free(cop);
CopFILE_free(cop);
CopSTASH_free(cop);
if (! specialWARN(cop->cop_warnings))
@@ -4004,7 +3992,7 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o)
cop->op_next = (OP*)cop;
if (label) {
- cop->cop_label = label;
+ CopLABEL_set(cop, label);
PL_hints |= HINT_BLOCK_SCOPE;
}
cop->cop_seq = seq;