@@ -70,7 +70,7 @@ static void init_structs(void);
7070
7171#define PyInt Py_ssize_t
7272#define PyString_Check (obj ) PyUnicode_Check(obj)
73- #define PyString_AsBytes (obj ) PyUnicode_AsEncodedString(obj, (char *)p_enc , NULL);
73+ #define PyString_AsBytes (obj ) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT , NULL);
7474#define PyString_FreeBytes (obj ) Py_XDECREF(bytes)
7575#define PyString_AsString (obj ) PyBytes_AsString(obj)
7676#define PyString_Size (obj ) PyBytes_GET_SIZE(bytes)
@@ -661,7 +661,7 @@ DoPy3Command(exarg_T *eap, const char *cmd)
661661
662662 /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause
663663 * SyntaxError (unicode error). */
664- cmdstr = PyUnicode_Decode (cmd , strlen (cmd ), (char * )p_enc , NULL );
664+ cmdstr = PyUnicode_Decode (cmd , strlen (cmd ), (char * )ENC_OPT , NULL );
665665 cmdbytes = PyUnicode_AsEncodedString (cmdstr , "utf-8" , NULL );
666666 Py_XDECREF (cmdstr );
667667 PyRun_SimpleString (PyBytes_AsString (cmdbytes ));
@@ -1463,7 +1463,7 @@ LineToString(const char *str)
14631463 }
14641464 * p = '\0' ;
14651465
1466- result = PyUnicode_Decode (tmp , len , (char * )p_enc , NULL );
1466+ result = PyUnicode_Decode (tmp , len , (char * )ENC_OPT , NULL );
14671467
14681468 vim_free (tmp );
14691469 return result ;
0 commit comments