summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-11-26 18:26:53 +0000
committerNicholas Clark <nick@ccl4.org>2006-11-26 18:26:53 +0000
commit2eccd3b2550197fc30b4f217fbedb861d6732099 (patch)
treebff0baf3ded401d8217a7b372f9334ee5360e0d0
parent1ff09fbafb1bac228ed8d2a6d60971f9319e4977 (diff)
downloadperl-2eccd3b2550197fc30b4f217fbedb861d6732099.tar.gz
Change (well, correct) S_add_data to take and return a U32.
p4raw-id: //depot/perl@29386
-rw-r--r--embed.fnc2
-rw-r--r--proto.h2
-rw-r--r--regcomp.c15
3 files changed, 10 insertions, 9 deletions
diff --git a/embed.fnc b/embed.fnc
index 0c82dfaf58..ec2041eab5 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 d3a623f9c7..52d4b746cf 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 0601033964..7297eb63f1 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 == '<') ? '>' : '\'';