diff options
author | Karl Williamson <khw@cpan.org> | 2014-05-04 18:58:51 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-05-30 16:13:46 -0600 |
commit | 30a15352eb3f11a226bd42ec93797b1e778f6e9f (patch) | |
tree | b6312c87cc3f28fe38159d37a71bafa7834234b7 /handy.h | |
parent | 6602b93363649555eb1086b0efd043f7ffa7d0b5 (diff) | |
download | perl-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.h | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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 |