diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-03 11:02:32 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-04 10:50:48 -0800 |
commit | 7ba26d48121ff365601a73eefc7798693a3a9118 (patch) | |
tree | e3caea486f49abbe974083843f4af2f5260b75f0 /sv.c | |
parent | 5d4e58dcdb5d3b0a6dfc17071d845e7fc69ff071 (diff) | |
download | perl-7ba26d48121ff365601a73eefc7798693a3a9118.tar.gz |
Clarify docs for sv_usepvn_flags
Note that the string must be the start of a mallocked block of memory,
and not a pointer to the middle of it.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4606,7 +4606,9 @@ Perl_sv_sethek(pTHX_ register SV *const sv, const HEK *const hek) Tells an SV to use C<ptr> to find its string value. Normally the string is stored inside the SV but sv_usepvn allows the SV to use an outside string. The C<ptr> should point to memory that was allocated -by C<malloc>. The string length, C<len>, must be supplied. By default +by C<malloc>. It must be the start of a mallocked block +of memory, and not a pointer to the middle of it. The +string length, C<len>, must be supplied. By default this function will realloc (i.e. move) the memory pointed to by C<ptr>, so that pointer should not be freed or used by the programmer after giving it to sv_usepvn, and neither should any pointers from "behind" |