diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-07-21 08:21:34 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-24 11:36:11 -0600 |
commit | 647d194c710f5704f11d2db1ccd47fef8710d87b (patch) | |
tree | 89836f8ebb3a6fd24e4739bf37d334dd6592b92a /regcomp.c | |
parent | c8849eb1c2c14b1c9a128a8f8a696ae1eac43f63 (diff) | |
download | perl-647d194c710f5704f11d2db1ccd47fef8710d87b.tar.gz |
regcomp.c: Centralize assignment
It's better to do something in one common place than two. This properly
initializes the regex opcode for the synthetic start class when it is
created, rather than at the end where the code has to be repeated to get
all instances.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -860,6 +860,7 @@ S_cl_init(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) cl->type = ANYOF; cl_anything(pRExC_state, cl); ARG_SET(cl, ANYOF_NONBITMAP_EMPTY); + OP(cl) = ANYOF_SYNTHETIC; } /* These two functions currently do the exact same thing */ @@ -6307,7 +6308,6 @@ reStudy: && !cl_is_anything(data.start_class)) { const U32 n = add_data(pRExC_state, 1, "f"); - OP(data.start_class) = ANYOF_SYNTHETIC; Newx(RExC_rxi->data->data[n], 1, struct regnode_charclass_class); @@ -6380,7 +6380,6 @@ reStudy: && !cl_is_anything(data.start_class)) { const U32 n = add_data(pRExC_state, 1, "f"); - OP(data.start_class) = ANYOF_SYNTHETIC; Newx(RExC_rxi->data->data[n], 1, struct regnode_charclass_class); |