diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-12-10 23:05:25 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-12-10 23:05:25 +0000 |
commit | a1cac82e623c5bbb331e6465011c5b46dfbfc277 (patch) | |
tree | 765d41726b3d032b5800bf8b245b05f5a9fc7dd5 /regcomp.h | |
parent | 0b3e77ec2e46a23afe97475f6b9bf7880fae85f1 (diff) | |
download | perl-a1cac82e623c5bbb331e6465011c5b46dfbfc277.tar.gz |
Remove code duplication in S_to_utf8_substr() and S_to_byte_substr()
by taking advantage of how anchored_* and float_* are stored in arrays
to use a loop.
p4raw-id: //depot/perl@29503
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -484,6 +484,8 @@ struct reg_data { void* data[1]; }; +/* Code in S_to_utf8_substr() and S_to_byte_substr() in regexec.c accesses + anchored* and float* via array indexes 0 and 1. */ #define anchored_substr substrs->data[0].substr #define anchored_utf8 substrs->data[0].utf8_substr #define anchored_offset substrs->data[0].min_offset |