Mercurial > vim
diff src/if_py_both.h @ 15605:62b3805506b3 v8.1.0810
patch 8.1.0810: too many #ifdefs
commit https://github.com/vim/vim/commit/264b74fa545edfb92c0d7d08a02c26331cc5b168
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 17:18:42 2019 +0100
patch 8.1.0810: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, part 4.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 17:30:08 +0100 |
parents | dd725a8ab112 |
children | 6f1c7e9a6393 |
line wrap: on
line diff
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -24,11 +24,7 @@ static char_u e_py_systemexit[] = "E880: typedef int Py_ssize_t; /* Python 2.4 and earlier don't have this type. */ #endif -#ifdef FEAT_MBYTE -# define ENC_OPT ((char *)p_enc) -#else -# define ENC_OPT "latin1" -#endif +#define ENC_OPT ((char *)p_enc) #define DOPY_FUNC "_vim_pydo" static const char *vim_special_path = "_vim_path_"; @@ -985,11 +981,7 @@ VimStrwidth(PyObject *self UNUSED, PyObj if (!(str = StringToChars(string, &todecref))) return NULL; -#ifdef FEAT_MBYTE len = mb_string2cells(str, (int)STRLEN(str)); -#else - len = STRLEN(str); -#endif Py_XDECREF(todecref);