diff options
author | Karl Williamson <khw@cpan.org> | 2018-09-19 10:02:24 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-09-20 08:30:45 -0600 |
commit | 94b1fc235db3d15b93f78567e32ea87641156e25 (patch) | |
tree | e851fc22d1ddd47d9c514765219ebc979560c128 /regcomp.h | |
parent | bb0fd582c95534a9ca32b229a3d48714b0dee852 (diff) | |
download | perl-94b1fc235db3d15b93f78567e32ea87641156e25.tar.gz |
Don't overallocate space for /[foo]/
The ANYOF regnode type (generated by bracketed character classes and
\p{}) was allocating too much space because the argument field was being counted twice
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -690,8 +690,10 @@ struct regnode_ssc { #define ANYOF_BITMAP_CLEARALL(p) \ Zero (ANYOF_BITMAP(p), ANYOF_BITMAP_SIZE) -#define ANYOF_SKIP EXTRA_SIZE(regnode_charclass) -#define ANYOF_POSIXL_SKIP EXTRA_SIZE(regnode_charclass_posixl) +#define ANYOF_SKIP (EXTRA_SIZE(regnode_charclass) \ + - EXTRA_SIZE(struct regnode_1)) +#define ANYOF_POSIXL_SKIP (EXTRA_SIZE(regnode_charclass_posixl) \ + - EXTRA_SIZE(struct regnode_1)) /* * Utility definitions. |