summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-08 18:19:48 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-08 18:19:48 +0200
commit473de61b0409f8f8c86585733f099f882122b280 (patch)
tree0c2b031a29a283c70d63368c38031517572d954c /src/macros.h
parentcd9c46265e4a12cf716187bc8188c7399797f806 (diff)
downloadvim-git-473de61b0409f8f8c86585733f099f882122b280.tar.gz
updated for version 7.3.1149v7.3.1149
Problem: New regexp engine: Matching plain text could be faster. Solution: Detect a plain text match and handle it specifically. Add vim_regfree().
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h
index 9e3ba44b4..1737cfa54 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -272,6 +272,7 @@
# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
# define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
+# define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
# define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
#else
# define MB_PTR2LEN(p) 1
@@ -280,6 +281,7 @@
# define mb_ptr_back(s, p) --p
# define MB_COPY_CHAR(f, t) *t++ = *f++
# define MB_CHARLEN(p) STRLEN(p)
+# define MB_CHAR2LEN(c) 1
# define PTR2CHAR(p) ((int)*(p))
#endif