From: Nicholas Clark Date: Sun, 26 Nov 2006 18:26:53 +0000 (+0000) Subject: Change (well, correct) S_add_data to take and return a U32. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2eccd3b2550197fc30b4f217fbedb861d6732099;p=p5sagit%2Fp5-mst-13.2.git Change (well, correct) S_add_data to take and return a U32. p4raw-id: //depot/perl@29386 --- diff --git a/embed.fnc b/embed.fnc index 0c82dfa..ec2041e 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1335,7 +1335,7 @@ Es |I32 |study_chunk |NN struct RExC_state_t* state|NN regnode **scanp \ |I32 stopparen|NULLOK U8* recursed \ |NULLOK struct regnode_charclass_class *and_withp \ |U32 flags|U32 depth -EsRn |I32 |add_data |NN struct RExC_state_t* state|I32 n|NN const char *s +EsRn |U32 |add_data |NN struct RExC_state_t* state|U32 n|NN const char *s rs |void |re_croak2 |NN const char* pat1|NN const char* pat2|... Es |I32 |regpposixcc |NN struct RExC_state_t* state|I32 value Es |void |checkposixcc |NN struct RExC_state_t* state diff --git a/proto.h b/proto.h index d3a623f..52d4b74 100644 --- a/proto.h +++ b/proto.h @@ -3639,7 +3639,7 @@ STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t* state, regnode **scanp, I32 __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); -STATIC I32 S_add_data(struct RExC_state_t* state, I32 n, const char *s) +STATIC U32 S_add_data(struct RExC_state_t* state, U32 n, const char *s) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); diff --git a/regcomp.c b/regcomp.c index 0601033..7297eb6 100644 --- a/regcomp.c +++ b/regcomp.c @@ -3860,8 +3860,8 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, return min < stopmin ? min : stopmin; } -STATIC I32 -S_add_data(RExC_state_t *pRExC_state, I32 n, const char *s) +STATIC U32 +S_add_data(RExC_state_t *pRExC_state, U32 n, const char *s) { if (RExC_rxi->data) { const U32 count = RExC_rxi->data->count; @@ -4433,7 +4433,7 @@ reStudy: && !(data.start_class->flags & ANYOF_EOS) && !cl_is_anything(data.start_class)) { - const I32 n = add_data(pRExC_state, 1, "f"); + const U32 n = add_data(pRExC_state, 1, "f"); Newx(RExC_rxi->data->data[n], 1, struct regnode_charclass_class); @@ -4503,7 +4503,7 @@ reStudy: if (!(data.start_class->flags & ANYOF_EOS) && !cl_is_anything(data.start_class)) { - const I32 n = add_data(pRExC_state, 1, "f"); + const U32 n = add_data(pRExC_state, 1, "f"); Newx(RExC_rxi->data->data[n], 1, struct regnode_charclass_class); @@ -5070,7 +5070,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) /* FALL THROUGH */ case '{': /* (?{...}) */ { - I32 count = 1, n = 0; + I32 count = 1; + U32 n = 0; char c; char *s = RExC_parse; @@ -5159,7 +5160,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) { char ch = RExC_parse[0] == '<' ? '>' : '\''; char *name_start= RExC_parse++; - I32 num = 0; + U32 num = 0; SV *sv_dat=reg_scan_name(pRExC_state, SIZE_ONLY ? REG_RSN_RETURN_NULL : REG_RSN_RETURN_DATA); if (RExC_parse == name_start || *RExC_parse != ch) @@ -6305,7 +6306,7 @@ tryagain: goto defchar; } else { char* name_start = (RExC_parse += 2); - I32 num = 0; + U32 num = 0; SV *sv_dat = reg_scan_name(pRExC_state, SIZE_ONLY ? REG_RSN_RETURN_NULL : REG_RSN_RETURN_DATA); ch= (ch == '<') ? '>' : '\'';