0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.0810: too many #ifdefs

Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 4.
This commit is contained in:
Bram Moolenaar
2019-01-24 17:18:42 +01:00
parent a12a161b8c
commit 264b74fa54
25 changed files with 204 additions and 877 deletions

View File

@@ -24,11 +24,7 @@ static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception
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, PyObject *string)
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);