diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2002-04-08 03:56:52 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-04-08 03:56:52 +0000 |
commit | 61a925eda18b6c5f96251d619d58529102314a24 (patch) | |
tree | 0821ac13d01b86ef4660e9d17933ec10a0ed0b03 /util.c | |
parent | 39149da365a92c1591bb7f6e6f7b139f25712356 (diff) | |
download | perl-61a925eda18b6c5f96251d619d58529102314a24.tar.gz |
New descriptions for savepv*(), as suggested by Gisle Aas.
p4raw-id: //depot/perl@15798
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -883,7 +883,10 @@ Perl_ibcmp_locale(pTHX_ const char *s1, const char *s2, register I32 len) =for apidoc savepv -Copy a string to a safe spot. This does not use an SV. +Perl's version of C<strdup()>. Returns a pointer to a newly allocated +string which is a duplicate of C<pv>. The size of the string is +determined by C<strlen()>. The memory allocated for the new string can +be freed with the C<Safefree()> function. =cut */ @@ -904,9 +907,10 @@ Perl_savepv(pTHX_ const char *pv) /* =for apidoc savepvn -Copy a string to a safe spot. The C<len> indicates number of bytes to -copy. If pointer is NULL allocate space for a string of size specified. -This does not use an SV. +Perl's version of what C<strndup()> would be if it existed. Returns a +pointer to a newly allocated string which is a duplicate of the first +C<len> bytes from C<pv>. The memory allocated for the new string can be +freed with the C<Safefree()> function. =cut */ @@ -931,8 +935,8 @@ Perl_savepvn(pTHX_ const char *pv, register I32 len) /* =for apidoc savesharedpv -Copy a string to a safe spot in memory shared between threads. -This does not use an SV. +A version of C<savepv()> which allocates the duplicate string in memory +which is shared between threads. =cut */ |