From 2228b3d92dc6b04915a758fc6d3e4d724fb976c7 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 5 Sep 2020 21:31:27 -0600 Subject: [PATCH] perlapi: Consolidate sv_catsv-ish entries --- mathoms.c | 8 -------- sv.c | 31 ++++++++++++++++++++----------- sv.h | 2 -- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/mathoms.c b/mathoms.c index 332c57e..a07b260 100644 --- a/mathoms.c +++ b/mathoms.c @@ -283,14 +283,6 @@ Perl_sv_catsv(pTHX_ SV *dsv, SV *sstr) sv_catsv_flags(dsv, sstr, SV_GMAGIC); } -/* -=for apidoc sv_catsv_mg - -Like C, but also handles 'set' magic. - -=cut -*/ - void Perl_sv_catsv_mg(pTHX_ SV *dsv, SV *sstr) { diff --git a/sv.c b/sv.c index b5e3a72..4e9f45a 100644 --- a/sv.c +++ b/sv.c @@ -5516,20 +5516,29 @@ Perl_sv_catpvn_flags(pTHX_ SV *const dsv, const char *sstr, const STRLEN slen, c /* =for apidoc sv_catsv +=for apidoc_item sv_catsv_flags +=for apidoc_item sv_catsv_mg +=for apidoc_item sv_catsv_nomg -Concatenates the string from SV C onto the end of the string in SV -C. If C is null, does nothing; otherwise modifies only C. -Handles 'get' magic on both SVs, but no 'set' magic. See C> -and C>. +These concatenate the string from SV C onto the end of the string in SV +C. If C is null, these are no-ops; otherwise only C is +modified. -=for apidoc sv_catsv_flags +They differ only in what magic they perform: -Concatenates the string from SV C onto the end of the string in SV -C. If C is null, does nothing; otherwise modifies only C. -If C has the C bit set, will call C> on both SVs if -appropriate. If C has the C bit set, C> will be called on -the modified SV afterward, if appropriate. C, C, -and C are implemented in terms of this function. +C performs 'get' magic on both SVs before the copy, and 'set' magic +on C afterwards. + +C performs just 'get' magic, on both SVs. + +C skips all magic. + +C has an extra C parameter which allows you to use +C and/or C to specify any combination of magic handling +(although either both or neither SV will have 'get' magic applied to it.) + +C, C, and C are implemented +in terms of C. =cut */ diff --git a/sv.h b/sv.h index bf4885b..fc35f34 100644 --- a/sv.h +++ b/sv.h @@ -1720,8 +1720,6 @@ scalar. =for apidoc Am|void|sv_catpv_nomg|SV* sv|const char* ptr Like C but doesn't process magic. -=for apidoc Am|void|sv_catsv_nomg|SV* dsv|SV* ssv -Like C but doesn't process magic. =cut */ -- 1.8.3.1