diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-11 18:05:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-11 18:05:02 +0200 |
commit | efc0d94afc48a03b07955e91315e7e67945cd079 (patch) | |
tree | 75e42d881bc5f83429372139eb0cb5f8d554fb59 /src/if_py_both.h | |
parent | 204ade6bcb85f48f56e52e040d1ebf40548d92be (diff) | |
download | vim-git-efc0d94afc48a03b07955e91315e7e67945cd079.tar.gz |
patch 8.2.1834: PyEval_InitThreads() is deprecated in Python 3.9v8.2.1834
Problem: PyEval_InitThreads() is deprecated in Python 3.9.
Solution: Do not call PyEval_InitThreads in Python 3.9 and later. (Ken
Takata, closes #7113) Avoid warnings for functions.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 86942b686..36dedaf2d 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -307,7 +307,7 @@ ObjectDir(PyObject *self, char **attributes) // Output buffer management // Function to write a line, points to either msg() or emsg(). -typedef void (*writefn)(char_u *); +typedef int (*writefn)(char *); static PyTypeObject OutputType; @@ -359,8 +359,8 @@ PythonIO_Flush(void) { if (old_fn != NULL && io_ga.ga_len > 0) { - ((char_u *)io_ga.ga_data)[io_ga.ga_len] = NUL; - old_fn((char_u *)io_ga.ga_data); + ((char *)io_ga.ga_data)[io_ga.ga_len] = NUL; + old_fn((char *)io_ga.ga_data); } io_ga.ga_len = 0; } @@ -390,7 +390,7 @@ writer(writefn fn, char_u *str, PyInt n) mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len); ((char *)io_ga.ga_data)[io_ga.ga_len + len] = NUL; - fn((char_u *)io_ga.ga_data); + fn((char *)io_ga.ga_data); str = ptr + 1; n -= len + 1; io_ga.ga_len = 0; |