summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-07-30 23:49:58 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-25 12:23:59 -0700
commit49f55535e0b402f8cbdf839b5f2c88306c91a31d (patch)
tree53d85774d91296f9ee177a27425e7be58dcf2dd7 /proto.h
parenta10eae290937db109954431d254a9a25287f190b (diff)
downloadperl-49f55535e0b402f8cbdf839b5f2c88306c91a31d.tar.gz
Stop substr re optimisation from rejecting long strs
Using I32 for the fields that record information about the location of a fixed string that must be found for a regular expression to match can result in match failures, because I32 is not large enough to store offsets >= 2**31. SSize_t is appropriate, since it is 64 bits on 64-bit platforms and 32 bits on 32-bit platforms. This commit changes enough instances of I32 to SSize_t to get the added test passing and suppress compiler warnings. A later commit will change many more.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index d7c9f32fb7..26b52a34ef 100644
--- a/proto.h
+++ b/proto.h
@@ -6773,7 +6773,7 @@ STATIC void S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct s
#define PERL_ARGS_ASSERT_SCAN_COMMIT \
assert(pRExC_state); assert(data); assert(minlenp)
-STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *minlenp, I32 *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth)
+STATIC SSize_t S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3)