summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-24 17:18:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-24 17:18:42 +0100
commit264b74fa545edfb92c0d7d08a02c26331cc5b168 (patch)
tree2cd0e8517c498f4ce1442492572032be9815654d /src/if_py_both.h
parenta12a161b8ce09d024ed71c2134149fa323f8ee8e (diff)
downloadvim-git-264b74fa545edfb92c0d7d08a02c26331cc5b168.tar.gz
patch 8.1.0810: too many #ifdefsv8.1.0810
Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 4.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 233489ecc..f15bdc366 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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);