From: Jarkko Hietaniemi Date: Mon, 11 Sep 2000 23:01:50 +0000 (+0000) Subject: Document the SvUTF8*(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=914184e127659d74e06479dfe3f4f7da0f8315c4;p=p5sagit%2Fp5-mst-13.2.git Document the SvUTF8*(). p4raw-id: //depot/perl@7052 --- diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 9974edc..b1feed3 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -2151,6 +2151,16 @@ Tells an SV that it is a string and disables all other OK bits. =for hackers Found in file sv.h +=item SvPOK_only_UTF8 + +Tells an SV that it is a UTF8 string (do not use frivolously) +and disables all other OK bits. + + void SvPOK_only_UTF8(SV* sv) + +=for hackers +Found in file sv.h + =item SvPV Returns a pointer to the string in the SV, or a stringified form of the SV @@ -2421,6 +2431,33 @@ perform the upgrade if necessary. See C. =for hackers Found in file sv.h +=item SvUTF8 + +Returns a boolean indicating whether the SV contains UTF-8 encoded data. + + void SvUTF8(SV* sv) + +=for hackers +Found in file sv.h + +=item SvUTF8_off + +Unsets the UTF8 status of an SV. + + void SvUTF8_off(SV *sv) + +=for hackers +Found in file sv.h + +=item SvUTF8_on + +Tells an SV that it is a string and encoded in UTF8. Do not use frivolously. + + void SvUTF8_on(SV *sv) + +=for hackers +Found in file sv.h + =item SvUV Coerces the given SV to an unsigned integer and returns it. diff --git a/sv.h b/sv.h index b91cc5f..fa73a86 100644 --- a/sv.h +++ b/sv.h @@ -575,6 +575,23 @@ Set the length of the string which is in the SV. See C. #define SvNOK_only(sv) ((void)SvOK_off(sv), \ SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) +/* +=for apidoc Am|void|SvUTF8|SV* sv +Returns a boolean indicating whether the SV contains UTF-8 encoded data. + +=for apidoc Am|void|SvUTF8_on|SV *sv +Tells an SV that it is a string and encoded in UTF8. Do not use frivolously. + +=for apidoc Am|void|SvUTF8_off|SV *sv +Unsets the UTF8 status of an SV. + +=for apidoc Am|void|SvPOK_only_UTF8|SV* sv +Tells an SV that it is a UTF8 string (do not use frivolously) +and disables all other OK bits. + +=cut + */ + #define SvUTF8(sv) (SvFLAGS(sv) & SVf_UTF8) #define SvUTF8_on(sv) (SvFLAGS(sv) |= (SVf_UTF8)) #define SvUTF8_off(sv) (SvFLAGS(sv) &= ~(SVf_UTF8))