diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2019-05-23 10:53:23 +0900 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2019-05-23 10:53:23 +0900 |
commit | b40dde705af4d53853de6185a2468153b442dc9a (patch) | |
tree | e8dabba695163c2d07439fad6accff761f8f714c /src/coding.h | |
parent | 5d7dafacf4afc888511649f6fc24c28210cd0dfc (diff) | |
parent | 03feb9376b54c489e24478954a11061e9b0d6db7 (diff) | |
download | emacs-b40dde705af4d53853de6185a2468153b442dc9a.tar.gz emacs-b40dde705af4d53853de6185a2468153b442dc9a.tar.bz2 emacs-b40dde705af4d53853de6185a2468153b442dc9a.zip |
Merge branch 'master' into harfbuzz
Diffstat (limited to 'src/coding.h')
-rw-r--r-- | src/coding.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/coding.h b/src/coding.h index 0c03d1a44ed..619ca29c8e4 100644 --- a/src/coding.h +++ b/src/coding.h @@ -695,6 +695,7 @@ extern Lisp_Object raw_text_coding_system (Lisp_Object); extern bool raw_text_coding_system_p (struct coding_system *); extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object); extern Lisp_Object complement_process_encoding_system (Lisp_Object); +extern Lisp_Object make_string_from_utf8 (const char *, ptrdiff_t); extern void decode_coding_gap (struct coding_system *, ptrdiff_t, ptrdiff_t); @@ -762,6 +763,16 @@ surrogates_to_codepoint (int low, int high) return 0x10000 + (low - 0xDC00) + ((high - 0xD800) * 0x400); } +/* Like build_string, but always returns a multibyte string, and is + optimized for speed when STR is a UTF-8 encoded text string. */ + +INLINE Lisp_Object +build_string_from_utf8 (const char *str) +{ + return make_string_from_utf8 (str, strlen (str)); +} + + extern Lisp_Object preferred_coding_system (void); /* Coding system to be used to encode text for terminal display when |