regcomp.c: Change some static parameters to const
authorKarl Williamson <public@khwilliamson.com>
Thu, 15 Aug 2013 20:49:37 +0000 (14:49 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 24 Sep 2013 17:36:17 +0000 (11:36 -0600)
I found I needed const in a future commit.

embed.fnc
proto.h
regcomp.c

index 9e69596..5717f4c 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2072,8 +2072,8 @@ Es        |SSize_t|study_chunk    |NN RExC_state_t *pRExC_state \
                                |I32 stopparen|NULLOK U8* recursed \
                                |NULLOK regnode_ssc *and_withp \
                                |U32 flags|U32 depth
-EsRn   |U32    |add_data       |NN RExC_state_t *pRExC_state|U32 n \
-                               |NN const char *s
+EsRn   |U32    |add_data       |NN RExC_state_t* const pRExC_state \
+                               |const U32 n|NN const char* const s
 rs     |void   |re_croak2      |bool utf8|NN const char* pat1|NN const char* pat2|...
 Ei     |I32    |regpposixcc    |NN RExC_state_t *pRExC_state \
                                |I32 value|const bool strict
diff --git a/proto.h b/proto.h
index 184805d..d616510 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -6533,7 +6533,7 @@ STATIC SV*        S__new_invlist_C_array(pTHX_ const UV* const list)
 PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
                        __attribute__warn_unused_result__;
 
-STATIC U32     S_add_data(RExC_state_t *pRExC_state, U32 n, const char *s)
+STATIC U32     S_add_data(RExC_state_t* const pRExC_state, const U32 n, const char* const s)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(3);
index 438cd79..2fbc1b4 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4763,7 +4763,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVdf" RHS=%"UVdf"\n",
 }
 
 STATIC U32
-S_add_data(RExC_state_t *pRExC_state, U32 n, const char *s)
+S_add_data(RExC_state_t* const pRExC_state, const U32 n, const char* const s)
 {
     U32 count = RExC_rxi->data ? RExC_rxi->data->count : 0;