Skip to content

Commit c4ffce9

Browse files
committed
updated for version 7.3.236
Problem: Python 3 doesn't compile without +multi_byte Solution: Use "latin1" when MULTI_BYTE is not defined. (lilydjwg)
1 parent 0a51880 commit c4ffce9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/if_python3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ static char *(features[]) =
709709

710710
static int included_patches[] =
711711
{ /* Add new patch number below this line */
712+
/**/
713+
236,
712714
/**/
713715
235,
714716
/**/

0 commit comments

Comments
 (0)