diff options
author | Karl Williamson <khw@cpan.org> | 2020-09-05 21:16:04 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-09-14 09:45:25 -0600 |
commit | 5c8d9b4a5836263ca6e73810ada71a71c5f85d84 (patch) | |
tree | 69263167270bf0e0f7ec31500cbe7877b60847e5 | |
parent | b290de04ef0feed908dac30e9716be24ba92cfd3 (diff) | |
download | perl-5c8d9b4a5836263ca6e73810ada71a71c5f85d84.tar.gz |
perlapi: Consolidate sv_utf8_downgrade-ish entries
-rw-r--r-- | sv.c | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -3638,26 +3638,24 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extr /* =for apidoc sv_utf8_downgrade +=for apidoc_item sv_utf8_downgrade_flags +=for apidoc_item sv_utf8_downgrade_nomg -Attempts to convert the PV of an SV from characters to bytes. -If the PV contains a character that cannot fit -in a byte, this conversion will fail; -in this case, either returns false or, if C<fail_ok> is not -true, croaks. +These attempt to convert the PV of an SV from characters to bytes. If the PV +contains a character that cannot fit in a byte, this conversion will fail; in +this case, C<FALSE> is returned if C<fail_ok> is true; otherwise they croak. -This is not a general purpose Unicode to byte encoding interface: +They are not a general purpose Unicode to byte encoding interface: use the C<Encode> extension for that. -This function process get magic on C<sv>. - -=for apidoc sv_utf8_downgrade_nomg +They differ only in that: -Like C<sv_utf8_downgrade>, but does not process get magic on C<sv>. +C<sv_utf8_downgrade> processes 'get' magic on C<sv>. -=for apidoc sv_utf8_downgrade_flags +C<sv_utf8_downgrade_nomg> does not. -Like C<sv_utf8_downgrade>, but with additional C<flags>. -If C<flags> has C<SV_GMAGIC> bit set, processes get magic on C<sv>. +C<sv_utf8_downgrade_flags> has an additional C<flags> parameter in which you can specify +C<SV_GMAGIC> to process 'get' magic, or leave it cleared to not proccess 'get' magic. =cut */ |