diff options
author | Kenichi Handa <handa@m17n.org> | 2008-04-17 01:09:57 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2008-04-17 01:09:57 +0000 |
commit | 94ef4d69c135f6d58fe0a79bd6747c509931fc5c (patch) | |
tree | 10229e601237bc6c5e7252296c40281939f866a3 /src | |
parent | a5e83c39a795ecadc7194e5c0a361cbd50f8a39e (diff) | |
download | emacs-94ef4d69c135f6d58fe0a79bd6747c509931fc5c.tar.gz emacs-94ef4d69c135f6d58fe0a79bd6747c509931fc5c.tar.bz2 emacs-94ef4d69c135f6d58fe0a79bd6747c509931fc5c.zip |
(STRING_SET_MULTIBYTE): New macro.
Diffstat (limited to 'src')
-rw-r--r-- | src/lisp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index c9a33307bc4..ab07ea750f4 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -725,6 +725,13 @@ extern int string_bytes P_ ((struct Lisp_String *)); (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) |