From: Rafael Garcia-Suarez Date: Fri, 25 Mar 2005 18:03:00 +0000 (+0000) Subject: Remove the const qualifier from argv and env variables X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f42b153a33e87e34587f52f491b24c52b63b818;p=p5sagit%2Fp5-mst-13.2.git Remove the const qualifier from argv and env variables p4raw-id: //depot/perl@24077 --- diff --git a/embed.fnc b/embed.fnc index 5b4719d..4904dc9 100644 --- a/embed.fnc +++ b/embed.fnc @@ -47,7 +47,7 @@ Anod |void |perl_free |PerlInterpreter* interp Anod |int |perl_run |PerlInterpreter* interp Anod |int |perl_parse |PerlInterpreter* interp|XSINIT_t xsinit \ |int argc|char** argv|char** env -Anp |bool |doing_taint |int argc|const char** argv|const char** env +Anp |bool |doing_taint |int argc|char** argv|char** env #if defined(USE_ITHREADS) Anod |PerlInterpreter*|perl_clone|PerlInterpreter* interp|UV flags # if defined(PERL_IMPLICIT_SYS) @@ -292,7 +292,7 @@ Ap |I32 |ibcmp |const char* a|const char* b|I32 len Ap |I32 |ibcmp_locale |const char* a|const char* b|I32 len Apd |I32 |ibcmp_utf8 |const char* a|char **pe1|UV l1|bool u1|const char* b|char **pe2|UV l2|bool u2 p |bool |ingroup |Gid_t testgid|Uid_t effective -p |void |init_argv_symbols|int argc|const char **argv +p |void |init_argv_symbols|int argc|char **argv p |void |init_debugger Ap |void |init_stacks Ap |void |init_tm |struct tm *ptm @@ -572,7 +572,7 @@ Ap |void |reentrant_free Anp |void* |reentrant_retry|const char*|... #endif Ap |void |call_atexit |ATEXIT_t fn|void *ptr -Apd |I32 |call_argv |const char* sub_name|I32 flags|const char** argv +Apd |I32 |call_argv |const char* sub_name|I32 flags|char** argv Apd |I32 |call_method |const char* methname|I32 flags Apd |I32 |call_pv |const char* sub_name|I32 flags Apd |I32 |call_sv |SV* sv|I32 flags diff --git a/intrpvar.h b/intrpvar.h index a477777..6a7bc36 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -29,7 +29,7 @@ PERLVAR(Iwarnhook, SV *) /* switches */ PERLVAR(Iminus_c, bool) PERLVAR(Ipatchlevel, SV *) -PERLVAR(Ilocalpatches, char **) +PERLVAR(Ilocalpatches, const char **) PERLVARI(Isplitstr, char *, " ") PERLVAR(Ipreprocess, bool) PERLVAR(Iminus_n, bool) diff --git a/perl.c b/perl.c index 4b1ee08..4a925b0 100644 --- a/perl.c +++ b/perl.c @@ -1222,7 +1222,7 @@ STATIC void * S_parse_body(pTHX_ char **env, XSINIT_t xsinit) { int argc = PL_origargc; - const char **argv = PL_origargv; + char **argv = PL_origargv; const char *scriptname = NULL; VOL bool dosearch = FALSE; const char *validarg = ""; @@ -1986,7 +1986,7 @@ Performs a callback to the specified Perl sub. See L. */ I32 -Perl_call_argv(pTHX_ const char *sub_name, I32 flags, register const char **argv) +Perl_call_argv(pTHX_ const char *sub_name, I32 flags, register char **argv) /* See G_* flags in cop.h */ /* null terminated arg list */ @@ -3812,7 +3812,7 @@ S_init_ids(pTHX) * before even the options are parsed, so PL_tainting has * not been initialized properly. */ bool -Perl_doing_taint(int argc, const char *argv[], const char *envp[]) +Perl_doing_taint(int argc, char *argv[], char *envp[]) { #ifndef PERL_IMPLICIT_SYS /* If we have PERL_IMPLICIT_SYS we can't call getuid() et alia @@ -4020,7 +4020,7 @@ S_init_predump_symbols(pTHX) } void -Perl_init_argv_symbols(pTHX_ register int argc, register const char **argv) +Perl_init_argv_symbols(pTHX_ register int argc, register char **argv) { char *s; argc--,argv++; /* skip name of script */ diff --git a/pod/perlapi.pod b/pod/perlapi.pod index da9abe8..a915892 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -310,7 +310,7 @@ Performs a callback to the specified Perl sub. See L. NOTE: the perl_ form of this function is deprecated. - I32 call_argv(const char* sub_name, I32 flags, const char** argv) + I32 call_argv(const char* sub_name, I32 flags, char** argv) =for hackers Found in file perl.c diff --git a/proto.h b/proto.h index cb8d8822..a40c23e 100644 --- a/proto.h +++ b/proto.h @@ -26,7 +26,7 @@ PERL_CALLCONV int perl_destruct(PerlInterpreter* interp); PERL_CALLCONV void perl_free(PerlInterpreter* interp); PERL_CALLCONV int perl_run(PerlInterpreter* interp); PERL_CALLCONV int perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env); -PERL_CALLCONV bool Perl_doing_taint(int argc, const char** argv, const char** env); +PERL_CALLCONV bool Perl_doing_taint(int argc, char** argv, char** env); #if defined(USE_ITHREADS) PERL_CALLCONV PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags); # if defined(PERL_IMPLICIT_SYS) @@ -269,7 +269,7 @@ PERL_CALLCONV I32 Perl_ibcmp(pTHX_ const char* a, const char* b, I32 len); PERL_CALLCONV I32 Perl_ibcmp_locale(pTHX_ const char* a, const char* b, I32 len); PERL_CALLCONV I32 Perl_ibcmp_utf8(pTHX_ const char* a, char **pe1, UV l1, bool u1, const char* b, char **pe2, UV l2, bool u2); PERL_CALLCONV bool Perl_ingroup(pTHX_ Gid_t testgid, Uid_t effective); -PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int argc, const char **argv); +PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int argc, char **argv); PERL_CALLCONV void Perl_init_debugger(pTHX); PERL_CALLCONV void Perl_init_stacks(pTHX); PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm); @@ -548,7 +548,7 @@ PERL_CALLCONV void Perl_reentrant_free(pTHX); PERL_CALLCONV void* Perl_reentrant_retry(const char*, ...); #endif PERL_CALLCONV void Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr); -PERL_CALLCONV I32 Perl_call_argv(pTHX_ const char* sub_name, I32 flags, const char** argv); +PERL_CALLCONV I32 Perl_call_argv(pTHX_ const char* sub_name, I32 flags, char** argv); PERL_CALLCONV I32 Perl_call_method(pTHX_ const char* methname, I32 flags); PERL_CALLCONV I32 Perl_call_pv(pTHX_ const char* sub_name, I32 flags); PERL_CALLCONV I32 Perl_call_sv(pTHX_ SV* sv, I32 flags);