diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-09-05 22:40:54 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-24 11:36:18 -0600 |
commit | 9a81a976fd1f8a25898421ce05e1e4d1b2ef88d3 (patch) | |
tree | 09cbedfcc60b24caf48cf0e4342f87977c89f274 /regcomp.h | |
parent | cf78de0bc205ee8b764da82ab0cc9c394067453e (diff) | |
download | perl-9a81a976fd1f8a25898421ce05e1e4d1b2ef88d3.tar.gz |
Enlarge dummy regex pass1 compilation node
In pass 1 of compiling regular expressions, the needed size is
calculated. There is space allocated for a scratch node that can be
used for the things that the real one will hold in pass 2. It is valid
only while working on the current node, and gets overwritten in the next
node.
Until this commit, this scratch space was sized only for the smallest
node type, meaning that larger types could not use it for scratch. Now
it is sized to be the largest non EXACTish node.
We could make it an array of 256 + overhead bytes instead to be able to
hold the EXACTish nodes, but I don't see a need for that now.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ struct regnode_ssc { #define REG_MAGIC 0234 -#define SIZE_ONLY (RExC_emit == &RExC_emit_dummy) +#define SIZE_ONLY (RExC_emit == (regnode *) & RExC_emit_dummy) #define PASS1 SIZE_ONLY #define PASS2 (! SIZE_ONLY) |