diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-19 22:11:41 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-19 22:11:41 +0100 |
commit | 828bff1f9b4847da79abd7a97ddc48687e257d6c (patch) | |
tree | 286bad3361bbc1b956b0c4201ab448eba098b50e /src | |
parent | 4eefe47ea4b6bf958617e924f52bc7a409cfb0ed (diff) |
patch 8.1.1020: compiler warning for Python3 interfacev8.1.1020
Problem: Compiler warning for Python3 interface.
Solution: Add type cast. (Ozaki Kiichi, closes #4128, closes #4103)
Diffstat (limited to 'src')
-rw-r--r-- | src/if_python3.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index 3c6ee15e3c..8b1b5beb6e 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -799,10 +799,11 @@ static struct PyModuleDef vimmodule; */ #include "if_py_both.h" +// NOTE: Must always be used at the start of a block, since it declares "name". #define GET_ATTR_STRING(name, nameobj) \ char *name = ""; \ if (PyUnicode_Check(nameobj)) \ - name = _PyUnicode_AsString(nameobj) + name = (char *)_PyUnicode_AsString(nameobj) #define PY3OBJ_DELETED(obj) (obj->ob_base.ob_refcnt<=0) diff --git a/src/version.c b/src/version.c index a32770e2b7..c336046bf4 100644 --- a/src/version.c +++ b/src/version.c @@ -780,6 +780,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1020, +/**/ 1019, /**/ 1018, |