changeset 94121:21ceec8c4a93

(STRING_SET_MULTIBYTE): New macro.
author Kenichi Handa <handa@m17n.org>
date Thu, 17 Apr 2008 01:09:57 +0000
parents 13dd1e5786bf
children c7f0faccd3c2
files src/lisp.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Thu Apr 17 00:31:56 2008 +0000
+++ b/src/lisp.h	Thu Apr 17 01:09:57 2008 +0000
@@ -725,6 +725,13 @@
       (STR) = empty_unibyte_string;  \
     else XSTRING (STR)->size_byte = -1; } while (0)
 
+/* Mark STR as a multibyte string.  Assure that STR contains only
+   ASCII characters in advance.  */
+#define STRING_SET_MULTIBYTE(STR)  \
+  do { if (EQ (STR, empty_unibyte_string))  \
+      (STR) = empty_multibyte_string;  \
+    else XSTRING (STR)->size_byte = XSTRING (STR)->size; } while (0)
+
 /* Get text properties.  */
 #define STRING_INTERVALS(STR)  (XSTRING (STR)->intervals + 0)