mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 7.4.1864
Problem: Python: encoding error with Python 2. Solution: Use "getcwdu" instead of "getcwd". (Ken Takata)
This commit is contained in:
@@ -6770,8 +6770,13 @@ populate_module(PyObject *m)
|
|||||||
return -1;
|
return -1;
|
||||||
ADD_OBJECT(m, "os", other_module);
|
ADD_OBJECT(m, "os", other_module);
|
||||||
|
|
||||||
|
#if PY_MAJOR_VERSION >= 3
|
||||||
if (!(py_getcwd = PyObject_GetAttrString(other_module, "getcwd")))
|
if (!(py_getcwd = PyObject_GetAttrString(other_module, "getcwd")))
|
||||||
return -1;
|
return -1;
|
||||||
|
#else
|
||||||
|
if (!(py_getcwd = PyObject_GetAttrString(other_module, "getcwdu")))
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
ADD_OBJECT(m, "_getcwd", py_getcwd)
|
ADD_OBJECT(m, "_getcwd", py_getcwd)
|
||||||
|
|
||||||
if (!(py_chdir = PyObject_GetAttrString(other_module, "chdir")))
|
if (!(py_chdir = PyObject_GetAttrString(other_module, "chdir")))
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1864,
|
||||||
/**/
|
/**/
|
||||||
1863,
|
1863,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user