diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-06 14:04:51 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-06 14:23:49 -0800 |
commit | 0abcdfa4c5da571f9a31d50e4a121867868e8aaf (patch) | |
tree | 69628a02e27d839663e8073694d0c9a88a782905 /parser.h | |
parent | bc344123285ead072c87437a15e486ff36fef609 (diff) | |
download | perl-0abcdfa4c5da571f9a31d50e4a121867868e8aaf.tar.gz |
Avoid redundant copies in string evals
Perl_lex_start copies the string passed to it unconditionally.
Sometimes pp_entereval makes a copy before passing the string
to lex_start. So in those cases we can pass a flag to avoid a
redundant copy.
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -119,8 +119,10 @@ typedef struct yy_parser { # define LEX_START_SAME_FILTER 0x00000001 # define LEX_IGNORE_UTF8_HINTS 0x00000002 # define LEX_EVALBYTES 0x00000004 +# define LEX_START_COPIED 0x00000008 # define LEX_START_FLAGS \ - (LEX_START_SAME_FILTER|LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES) + (LEX_START_SAME_FILTER|LEX_START_COPIED \ + |LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES) #endif /* flags for parser API */ |