summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2014-05-13 14:13:09 -0400
committerDavid Golden <dagolden@cpan.org>2014-05-13 14:16:34 -0400
commitcfe3322a9b07f6d396890b6c564e7ad953719819 (patch)
tree8e769a17e5d499fefa961274ce4525067dab392f /sv.h
parent58121923d35f3fce15ffab40b74e3f4e62419b25 (diff)
downloadperl-cfe3322a9b07f6d396890b6c564e7ad953719819.tar.gz
clarify SvPV documentation
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sv.h b/sv.h
index f5e28273ce..6332974f7c 100644
--- a/sv.h
+++ b/sv.h
@@ -1509,8 +1509,10 @@ Like C<SvPV_force>, but doesn't process get magic.
=for apidoc Am|char*|SvPV|SV* sv|STRLEN len
Returns a pointer to the string in the SV, or a stringified form of
the SV if the SV does not contain a string. The SV may cache the
-stringified version becoming C<SvPOK>. Handles 'get' magic. See also
-C<SvPVx> for a version which guarantees to evaluate sv only once.
+stringified version becoming C<SvPOK>. Handles 'get' magic. The
+C<len> variable will be set to the length of the string (this is a macro, so
+don't use C<&len>). See also C<SvPVx> for a version which guarantees to
+evaluate sv only once.
Note that there is no guarantee that the return value of C<SvPV()> is
equal to C<SvPVX(sv)>, or that C<SvPVX(sv)> contains valid data, or that