From: Abhijit Menon-Sen Date: Mon, 8 Apr 2002 01:27:24 +0000 (+0000) Subject: Fix prototypes of save{,shared}pv{,n} (s/sv/pv/) as suggested by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=efdfce318897a88f4fe0eecb99c8ded36f626a62;p=p5sagit%2Fp5-mst-13.2.git Fix prototypes of save{,shared}pv{,n} (s/sv/pv/) as suggested by Simon Cozens. p4raw-id: //depot/perl@15796 --- diff --git a/embed.fnc b/embed.fnc index d1a8185..bf0ecd5 100644 --- a/embed.fnc +++ b/embed.fnc @@ -622,9 +622,9 @@ p |void |rxres_save |void** rsp|REGEXP* prx #if !defined(HAS_RENAME) p |I32 |same_dirent |char* a|char* b #endif -Apd |char* |savepv |const char* sv -Apd |char* |savesharedpv |const char* sv -Apd |char* |savepvn |const char* sv|I32 len +Apd |char* |savepv |const char* pv +Apd |char* |savesharedpv |const char* pv +Apd |char* |savepvn |const char* pv|I32 len Ap |void |savestack_grow Ap |void |save_aelem |AV* av|I32 idx|SV **sptr Ap |I32 |save_alloc |I32 size|I32 pad diff --git a/util.c b/util.c index 4642031..f0bddb9 100644 --- a/util.c +++ b/util.c @@ -889,12 +889,12 @@ Copy a string to a safe spot. This does not use an SV. */ char * -Perl_savepv(pTHX_ const char *sv) +Perl_savepv(pTHX_ const char *pv) { register char *newaddr = Nullch; - if (sv) { - New(902,newaddr,strlen(sv)+1,char); - (void)strcpy(newaddr,sv); + if (pv) { + New(902,newaddr,strlen(pv)+1,char); + (void)strcpy(newaddr,pv); } return newaddr; } @@ -912,14 +912,14 @@ This does not use an SV. */ char * -Perl_savepvn(pTHX_ const char *sv, register I32 len) +Perl_savepvn(pTHX_ const char *pv, register I32 len) { register char *newaddr; New(903,newaddr,len+1,char); /* Give a meaning to NULL pointer mainly for the use in sv_magic() */ - if (sv) { - Copy(sv,newaddr,len,char); /* might not be null terminated */ + if (pv) { + Copy(pv,newaddr,len,char); /* might not be null terminated */ newaddr[len] = '\0'; /* is now */ } else { @@ -937,12 +937,12 @@ This does not use an SV. =cut */ char * -Perl_savesharedpv(pTHX_ const char *sv) +Perl_savesharedpv(pTHX_ const char *pv) { register char *newaddr = Nullch; - if (sv) { - newaddr = (char*)PerlMemShared_malloc(strlen(sv)+1); - (void)strcpy(newaddr,sv); + if (pv) { + newaddr = (char*)PerlMemShared_malloc(strlen(pv)+1); + (void)strcpy(newaddr,pv); } return newaddr; }