* Common code for if_python.c and if_python3.c.
*/
+#ifdef FEAT_MBYTE
+# define ENC_OPT p_enc
+#else
+# define ENC_OPT "latin1"
+#endif
+
/*
* obtain a lock on the Vim data structures
*/
char *str = NULL;
int error = ((OutputObject *)(self))->error;
- if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len))
+ if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len))
return NULL;
Py_BEGIN_ALLOW_THREADS
char *str = NULL;
PyInt len;
- if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) {
+ if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) {
PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings"));
Py_DECREF(list);
return NULL;