summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-09-05 21:19:30 -0600
committerKarl Williamson <khw@cpan.org>2020-11-10 13:36:36 -0700
commit60573beed1b38249375d94c13e86e71b29b3d0e3 (patch)
treef5394f4401152de81862da34b92c3b7ae56060fa /sv.c
parent47e6c6d93f57c4fc8d67fee6635d33d3bf768674 (diff)
downloadperl-60573beed1b38249375d94c13e86e71b29b3d0e3.tar.gz
perlapi: Consolidate sv_setpvn-ish entries
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sv.c b/sv.c
index 169c0924f0..3ed6f30c55 100644
--- a/sv.c
+++ b/sv.c
@@ -4907,15 +4907,20 @@ Perl_sv_setpv_bufsize(pTHX_ SV *const sv, const STRLEN cur, const STRLEN len)
/*
=for apidoc sv_setpvn
+=for apidoc_item sv_setpvn_mg
-Copies a string (possibly containing embedded C<NUL> characters) into an SV.
-The C<len> parameter indicates the number of
-bytes to be copied. If the C<ptr> argument is NULL the SV will become
-undefined. Does not handle 'set' magic. See C<L</sv_setpvn_mg>>.
+These copy a string (possibly containing embedded C<NUL> characters) into an
+SV. The C<len> parameter indicates the number of bytes to be copied. If the
+C<ptr> argument is NULL the SV will become
+undefined.
-The UTF-8 flag is not changed by this function. A terminating NUL byte is
+The UTF-8 flag is not changed by these functions. A terminating NUL byte is
guaranteed.
+They differ only in that:
+
+C<sv_setpvn> does not handle 'set' magic; C<sv_setpvn_mg> does.
+
=cut
*/
@@ -4951,14 +4956,6 @@ Perl_sv_setpvn(pTHX_ SV *const sv, const char *const ptr, const STRLEN len)
if (SvTYPE(sv) == SVt_PVCV) CvAUTOLOAD_off(sv);
}
-/*
-=for apidoc sv_setpvn_mg
-
-Like C<sv_setpvn>, but also handles 'set' magic.
-
-=cut
-*/
-
void
Perl_sv_setpvn_mg(pTHX_ SV *const sv, const char *const ptr, const STRLEN len)
{