summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-08 13:22:13 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-08 13:26:26 -0700
commitf990ea3e643a8031172d023dd7487731b6114279 (patch)
tree6f0e57323eb13fb103f7dbe8901a6bca20316d24 /sv.h
parent7f0bfbeaa5bacddb87a1fd89935735309cd50040 (diff)
downloadperl-f990ea3e643a8031172d023dd7487731b6114279.tar.gz
Correct SvEND docs
SvEND does not point to the last character, but to a spot just after it.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 218df0bb3e..c056423a77 100644
--- a/sv.h
+++ b/sv.h
@@ -693,9 +693,14 @@ Returns the size of the string buffer in the SV, not including any part
attributable to C<SvOOK>. See C<SvCUR>.
=for apidoc Am|char*|SvEND|SV* sv
-Returns a pointer to the last character in the string which is in the SV.
+Returns a pointer to the spot just after the last character in
+the string which is in the SV, where there is usually a trailing
+null (even though Perl scalars do not strictly require it).
See C<SvCUR>. Access the character as *(SvEND(sv)).
+Warning: If C<SvCUR> is equal to C<SvLEN>, then C<SvEND> points to
+unallocated memory.
+
=for apidoc Am|HV*|SvSTASH|SV* sv
Returns the stash of the SV.