diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-18 14:03:06 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-25 12:24:00 -0700 |
commit | ea3daa5d5f60389b105c00d4f7d05b5c2f2155f2 (patch) | |
tree | dab4742b68bc8dea8c9b4037a7172de242eb5889 /pod/perlreapi.pod | |
parent | 49f55535e0b402f8cbdf839b5f2c88306c91a31d (diff) | |
download | perl-ea3daa5d5f60389b105c00d4f7d05b5c2f2155f2.tar.gz |
Use SSize_t/STRLEN in more places in regexp code
As part of getting the regexp engine to handle long strings, this com-
mit changes any variables, parameters and struct members that hold
lengths of the string being matched against (or parts thereof) to use
SSize_t or STRLEN instead of [IU]32.
To avoid having to change any logic, I kept the signedness the same.
I did not change anything that affects the length of the regular
expression itself, so regexps are still practically limited to
I32_MAX. Changing that would involve changing the size of regnodes,
which would be a lot more involved.
These changes should fix bugs, but are very hard to test. In most
cases, I don’t know the regexp engine well enough to come up with test
cases that test the paths in question with long strings. In other
cases I don’t have a box with enough memory to test the fix.
Diffstat (limited to 'pod/perlreapi.pod')
-rw-r--r-- | pod/perlreapi.pod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlreapi.pod b/pod/perlreapi.pod index 659088e941..cfc41d7626 100644 --- a/pod/perlreapi.pod +++ b/pod/perlreapi.pod @@ -17,7 +17,7 @@ following format: REGEXP * const rx, char* stringarg, char* strend, char* strbeg, - I32 minend, SV* sv, + SSize_t minend, SV* sv, void* data, U32 flags); char* (*intuit) (pTHX_ REGEXP * const rx, SV *sv, @@ -238,7 +238,7 @@ certain optimisations when this is set. I32 exec(pTHX_ REGEXP * const rx, char *stringarg, char* strend, char* strbeg, - I32 minend, SV* sv, + SSize_t minend, SV* sv, void* data, U32 flags); Execute a regexp. The arguments are |