diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2002-04-08 01:27:24 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-04-08 01:27:24 +0000 |
commit | efdfce318897a88f4fe0eecb99c8ded36f626a62 (patch) | |
tree | 570676cdf3055bfde5ebefce448cf993f7d2c5e6 | |
parent | d781cccd63c46e3bedc8e8afd2d1e34fc8fa8b12 (diff) | |
download | perl-efdfce318897a88f4fe0eecb99c8ded36f626a62.tar.gz |
Fix prototypes of save{,shared}pv{,n} (s/sv/pv/) as suggested by
Simon Cozens.
p4raw-id: //depot/perl@15796
-rw-r--r-- | embed.fnc | 6 | ||||
-rw-r--r-- | util.c | 22 |
2 files changed, 14 insertions, 14 deletions
@@ -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 @@ -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; } |