summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-05-04 18:58:51 -0600
committerKarl Williamson <khw@cpan.org>2014-05-30 16:13:46 -0600
commit30a15352eb3f11a226bd42ec93797b1e778f6e9f (patch)
treeb6312c87cc3f28fe38159d37a71bafa7834234b7 /handy.h
parent6602b93363649555eb1086b0efd043f7ffa7d0b5 (diff)
downloadperl-30a15352eb3f11a226bd42ec93797b1e778f6e9f.tar.gz
perlapi: Clarify some instances where NUL is or isn't permitted
Some functions that take a string/length pair can have embedded NULs and don't have to be NUL terminated; others are the opposite. This adds text to clarify the issue.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/handy.h b/handy.h
index 5249b31b45..e4e5292d7a 100644
--- a/handy.h
+++ b/handy.h
@@ -304,19 +304,20 @@ typedef U64TYPE U64;
=head1 SV-Body Allocation
=for apidoc Ama|SV*|newSVpvs|const char* s
-Like C<newSVpvn>, but takes a literal string instead of a string/length pair.
+Like C<newSVpvn>, but takes a literal C<NUL>-terminated string instead of a
+string/length pair.
=for apidoc Ama|SV*|newSVpvs_flags|const char* s|U32 flags
-Like C<newSVpvn_flags>, but takes a literal string instead of a string/length
-pair.
+Like C<newSVpvn_flags>, but takes a literal C<NUL>-terminated string instead of
+a string/length pair.
=for apidoc Ama|SV*|newSVpvs_share|const char* s
-Like C<newSVpvn_share>, but takes a literal string instead of a string/length
-pair and omits the hash parameter.
+Like C<newSVpvn_share>, but takes a literal C<NUL>-terminated string instead of
+a string/length pair and omits the hash parameter.
=for apidoc Am|void|sv_catpvs_flags|SV* sv|const char* s|I32 flags
-Like C<sv_catpvn_flags>, but takes a literal string instead of a
-string/length pair.
+Like C<sv_catpvn_flags>, but takes a literal C<NUL>-terminated string instead
+of a string/length pair.
=for apidoc Am|void|sv_catpvs_nomg|SV* sv|const char* s
Like C<sv_catpvn_nomg>, but takes a literal string instead of a
@@ -343,7 +344,8 @@ string/length pair.
=head1 Memory Management
=for apidoc Ama|char*|savepvs|const char* s
-Like C<savepvn>, but takes a literal string instead of a string/length pair.
+Like C<savepvn>, but takes a literal C<NUL>-terminated string instead of a
+string/length pair.
=for apidoc Ama|char*|savesharedpvs|const char* s
A version of C<savepvs()> which allocates the duplicate string in memory