Change 29559 by [EMAIL PROTECTED] on 2006/12/15 20:14:07

        Better documentation for SVf_UTF8. Including SvPV() 1st, SvUTF() 2nd.

Affected files ...

... //depot/perl/sv.h#304 edit

Differences ...

==== //depot/perl/sv.h#304 (text) ====
Index: perl/sv.h
--- perl/sv.h#303~29554~        2006-12-14 03:23:16.000000000 -0800
+++ perl/sv.h   2006-12-15 12:14:07.000000000 -0800
@@ -339,8 +339,12 @@
 
 #define PRIVSHIFT 4    /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */
 
-#define SVf_AMAGIC     0x10000000      /* has magical overloaded methods */
-#define SVf_UTF8        0x20000000      /* SvPV is UTF-8 encoded */
+#define SVf_AMAGIC     0x10000000  /* has magical overloaded methods */
+#define SVf_UTF8        0x20000000  /* SvPV is UTF-8 encoded
+                                      This is also set on RVs whose overloaded
+                                      stringification is UTF-8. This might
+                                      only happen as a side effect of SvPV() */
+                                          
 /* Ensure this value does not clash with the GV_ADD* flags in gv.h */
 
 /* Some private flags. */
@@ -901,6 +905,8 @@
 /*
 =for apidoc Am|bool|SvUTF8|SV* sv
 Returns a boolean indicating whether the SV contains UTF-8 encoded data.
+Call this after SvPV() in case any call to string overloading updates the
+internal flag.
 
 =for apidoc Am|void|SvUTF8_on|SV *sv
 Turn on the UTF-8 status of an SV (the data is not changed, just the flag).
End of Patch.

Reply via email to