This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
util.c: some consting
authorSteven Schubiger <schubiger@cpan.org>
Fri, 25 Jan 2008 01:10:52 +0000 (02:10 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 28 Jan 2008 10:02:24 +0000 (10:02 +0000)
Message-ID: <20080125001052.GA29980@refcnt.homeunix.org>

p4raw-id: //depot/perl@33083

embed.fnc
global.sym
proto.h
util.c

index ef4ae06..5dbf474 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -525,7 +525,7 @@ Anp |void*  |my_memset      |NN char* loc|I32 ch|I32 len
 #endif
 Ap     |I32    |my_pclose      |NULLOK PerlIO* ptr
 Ap     |PerlIO*|my_popen       |NN const char* cmd|NN const char* mode
-Ap     |PerlIO*|my_popen_list  |NN char* mode|int n|NN SV ** args
+Ap     |PerlIO*|my_popen_list  |NN const char* mode|int n|NN SV ** args
 Ap     |void   |my_setenv      |NULLOK const char* nam|NULLOK const char* val
 Ap     |I32    |my_stat
 Ap     |char * |my_strftime    |NN const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst
index 1d7bf87..5423985 100644 (file)
@@ -464,7 +464,7 @@ Perl_save_scalar
 Perl_save_pptr
 Perl_save_vptr
 Perl_save_re_context
-Perl_save_padsv
+Perl_save_padsv_and_mortalize
 Perl_save_sptr
 Perl_save_svref
 Perl_scan_bin
diff --git a/proto.h b/proto.h
index 222bd14..95e67f1 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1391,7 +1391,7 @@ PERL_CALLCONV PerlIO*     Perl_my_popen(pTHX_ const char* cmd, const char* mode)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 
-PERL_CALLCONV PerlIO*  Perl_my_popen_list(pTHX_ char* mode, int n, SV ** args)
+PERL_CALLCONV PerlIO*  Perl_my_popen_list(pTHX_ const char* mode, int n, SV ** args)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3);
 
diff --git a/util.c b/util.c
index 556abb7..c2604e4 100644 (file)
--- a/util.c
+++ b/util.c
@@ -425,7 +425,7 @@ Perl_ninstr(pTHX_ const char *big, const char *bigend, const char *little, const
     if (little >= lend)
         return (char*)big;
     {
-        char first = *little++;
+        const char first = *little++;
         const char *s, *x;
         bigend -= lend - little;
     OUTER:
@@ -2213,7 +2213,7 @@ Perl_my_swabn(void *ptr, int n)
 }
 
 PerlIO *
-Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
+Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args)
 {
 #if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && !defined(OS2) && !defined(VMS) && !defined(__OPEN_VM) && !defined(EPOC) && !defined(MACOS_TRADITIONAL) && !defined(NETWARE) && !defined(__LIBCATAMOUNT__)
     dVAR;
@@ -2597,7 +2597,7 @@ Perl_my_fork(void)
 
 #ifdef DUMP_FDS
 void
-Perl_dump_fds(pTHX_ char *s)
+Perl_dump_fds(pTHX_ const char *const s)
 {
     int fd;
     Stat_t tmpstatbuf;