diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-29 22:48:23 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-29 22:48:23 -0500 |
commit | 3e665efea47911bcbe94485dd35efa4c3062c662 (patch) | |
tree | c5058e31d662c66bc5fb0b701d234f58fb9f7517 /src/nvim/macros.h | |
parent | 75524dbf9ac0013305fa4357066c36f41784a87c (diff) | |
parent | f75de5e671699fbcff93bb9715916a02b5c7b37d (diff) | |
download | rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.tar.gz rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.tar.bz2 rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.zip |
Merge pull request #1497 from splinterofchaos/const-attr
constify and func-attribute memory.c and strings.c
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index f8fd6ac6a2..215ad3a1f7 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -143,8 +143,9 @@ /* get length of multi-byte char, not including composing chars */ # define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)) -# define MB_COPY_CHAR(f, \ - t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++ +# define MB_COPY_CHAR(f, t) \ + if (has_mbyte) mb_copy_char((const char_u **)(&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)) |