diff options
author | Tony Cook <tony@develop-help.com> | 2015-08-19 14:35:29 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-08-19 14:35:29 +1000 |
commit | 668fcfea69086ab3cf35fc7ba175ea225dbc7f9d (patch) | |
tree | c5663378181758f16c92e6f4ea098be00bf68902 /regcomp.c | |
parent | 4b06b8deeb339269bad2112a4e6603e43f7bee36 (diff) | |
download | perl-668fcfea69086ab3cf35fc7ba175ea225dbc7f9d.tar.gz |
[perl #125826] make the buffer large enough in TRIE_STORE_REVCHAR
Since the SV is discarded almost immediately (in non-DEBUGGING builds)
don't worry about making it the smallest possible size.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2001,7 +2001,7 @@ is the recommended Unicode-aware way of saying #define TRIE_STORE_REVCHAR(val) \ STMT_START { \ if (UTF) { \ - SV *zlopp = newSV(7); /* XXX: optimize me */ \ + SV *zlopp = newSV(UTF8_MAXBYTES); \ unsigned char *flrbbbbb = (unsigned char *) SvPVX(zlopp); \ unsigned const char *const kapow = uvchr_to_utf8(flrbbbbb, val); \ SvCUR_set(zlopp, kapow - flrbbbbb); \ |