X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.h;h=425acc38328632c1eebeec4fe31d848ab99a40c4;hb=a6c71b5b9462db13c7bb2cd263cee5995315784c;hp=b91cc5fed197ec06ba4c25548e3f048bc54ea197;hpb=e331fc526c631ec7738ea465ef21f191ba7f166b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.h b/sv.h index b91cc5f..425acc3 100644 --- a/sv.h +++ b/sv.h @@ -61,7 +61,7 @@ typedef enum { /* Using C's structural equivalence to help emulate C++ inheritance here... */ -struct sv { +struct STRUCT_SV { void* sv_any; /* pointer to something */ U32 sv_refcnt; /* how many references to us */ U32 sv_flags; /* what we are */ @@ -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))