From 0536c0a707b1bd3cc19a63305350f2cd34667109 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 26 Nov 2006 20:52:49 +0000 Subject: [PATCH] A little reodering of the switch statement in Perl_regdupe makes a smaller executable. p4raw-id: //depot/perl@29390 --- regcomp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/regcomp.c b/regcomp.c index 80b8da1..bfcbd6b 100644 --- a/regcomp.c +++ b/regcomp.c @@ -8697,11 +8697,9 @@ Perl_regdupe(pTHX_ const regexp *r, CLONE_PARAMS *param) see also regcomp.h and pregfree() */ case 's': case 'S': + case 'p': /* actually an AV, but the dup function is identical. */ d->data[i] = sv_dup_inc((SV *)ri->data->data[i], param); break; - case 'p': - d->data[i] = av_dup_inc((AV *)ri->data->data[i], param); - break; case 'f': /* This is cheating. */ Newx(d->data[i], 1, struct regnode_charclass_class); @@ -8716,14 +8714,13 @@ Perl_regdupe(pTHX_ const regexp *r, CLONE_PARAMS *param) d->data[i] = (void*)OpREFCNT_inc((OP*)ri->data->data[i]); OP_REFCNT_UNLOCK; break; - case 'n': - d->data[i] = ri->data->data[i]; - break; case 't': - d->data[i] = ri->data->data[i]; OP_REFCNT_LOCK; - ((reg_trie_data*)d->data[i])->refcount++; + ((reg_trie_data*)ri->data->data[i])->refcount++; OP_REFCNT_UNLOCK; + /* Fall through */ + case 'n': + d->data[i] = ri->data->data[i]; break; case 'T': d->data[i] = ri->data->data[i]; -- 1.8.3.1