From: Nicholas Clark Date: Mon, 26 Sep 2005 17:54:06 +0000 (+0000) Subject: const sausage const const bacon const tomato and const X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f315aed809e0b5d2b9e836b3ec901f6db88f7d1;p=p5sagit%2Fp5-mst-13.2.git const sausage const const bacon const tomato and const The search_ext parameter to find_script can be a little more const. p4raw-id: //depot/perl@25605 --- diff --git a/embed.fnc b/embed.fnc index 0903c89..6c0b1e8 100644 --- a/embed.fnc +++ b/embed.fnc @@ -238,7 +238,7 @@ Apd |void |fbm_compile |NN SV* sv|U32 flags ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \ |NN SV* littlesv|U32 flags p |char* |find_script |const char *scriptname|bool dosearch \ - |const char **search_ext|I32 flags + |const char *const *const search_ext|I32 flags p |OP* |force_list |NULLOK OP* arg p |OP* |fold_constants |NN OP* arg Afpd |char* |form |NN const char* pat|... diff --git a/proto.h b/proto.h index cc4b7db..0fbe1df 100644 --- a/proto.h +++ b/proto.h @@ -483,7 +483,7 @@ PERL_CALLCONV char* Perl_fbm_instr(pTHX_ unsigned char* big, unsigned char* bige __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char **search_ext, I32 flags); +PERL_CALLCONV char* Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags); PERL_CALLCONV OP* Perl_force_list(pTHX_ OP* arg); PERL_CALLCONV OP* Perl_fold_constants(pTHX_ OP* arg) __attribute__nonnull__(pTHX_1); diff --git a/util.c b/util.c index 6e39cb6..ccbb7f9 100644 --- a/util.c +++ b/util.c @@ -2786,7 +2786,8 @@ Perl_same_dirent(pTHX_ const char *a, const char *b) #endif /* !HAS_RENAME */ char* -Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char **search_ext, I32 flags) +Perl_find_script(pTHX_ const char *scriptname, bool dosearch, + const char *const *const search_ext, I32 flags) { const char *xfound = Nullch; char *xfailed = Nullch; @@ -2808,8 +2809,8 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char **searc #endif /* additional extensions to try in each dir if scriptname not found */ #ifdef SEARCH_EXTS - const char *exts[] = { SEARCH_EXTS }; - const char **ext = search_ext ? search_ext : exts; + const char *const exts[] = { SEARCH_EXTS }; + const char *const *const ext = search_ext ? search_ext : exts; int extidx = 0, i = 0; const char *curext = Nullch; #else