This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Extract duplicated code to fcn
authorKarl Williamson <khw@cpan.org>
Mon, 15 Sep 2014 14:46:35 +0000 (08:46 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 29 Sep 2014 17:07:39 +0000 (11:07 -0600)
commitf917fa87667f8af2b4046abdd570ba6f00843f81
treed98e384d324adaf35b9125ba4e83e7111f78fc58
parentab4ad2b039e3f3ef88c73577588316a24010ffec
regcomp.c: Extract duplicated code to fcn

This causes the nearly-duplicate code of S_reg_node and S_reganode to be
placed into a single function, S_regnode_guts.

There is one place where it might not be obvious that this doesn't
change things.  And that is under DEBUGGING, reg_node() called

    Set_Node_Offset(RExC_emit, RExC_parse + (op == END));

and reganode called

    Set_Cur_Node_Offset;

However Set_Cur_Node_Offset is defined to be

    Set_Node_Offset(RExC_emit, RExC_parse)

and since op will never be END for reganode, the two statements are
equivalent.
embed.fnc
embed.h
proto.h
regcomp.c