patch 8.2.1834: PyEval_InitThreads() is deprecated in Python 3.9

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.
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 86942b6..36dedaf 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -307,7 +307,7 @@
 // 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 @@
 {
     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 @@
 
 	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;