Fixes and improvements for MS-Windows build.
diff --git a/src/if_python3.c b/src/if_python3.c
index 5400dc6..410dc14 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -321,6 +321,7 @@
 static int py3_runtime_link_init(char *libname, int verbose)
 {
     int i;
+    void *ucs_from_string, *ucs_from_string_and_size;
 
     if (hinstPy3)
 	return OK;
@@ -346,11 +347,8 @@
 	}
     }
 
-    /* load unicode functions separately as only the ucs2 or the ucs4 functions
-     * will be present in the library
-     */
-    void *ucs_from_string, *ucs_from_string_and_size;
-
+    /* Load unicode functions separately as only the ucs2 or the ucs4 functions
+     * will be present in the library. */
     ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString");
     ucs_from_string_and_size = symbol_from_dll(hinstPy3,
 	    "PyUnicodeUCS2_FromStringAndSize");
@@ -438,7 +436,7 @@
 static void PythonIO_Flush(void);
 static int PythonIO_Init(void);
 static void PythonIO_Fini(void);
-static PyMODINIT_FUNC Py3Init_vim(void);
+PyMODINIT_FUNC Py3Init_vim(void);
 
 /* Utility functions for the vim/python interface
  * ----------------------------------------------
@@ -2222,7 +2220,8 @@
 
 static struct PyModuleDef vimmodule;
 
-static PyMODINIT_FUNC Py3Init_vim(void)
+#ifndef PROTO
+PyMODINIT_FUNC Py3Init_vim(void)
 {
     PyObject *mod;
     /* The special value is removed from sys.path in Python3_Init(). */
@@ -2255,6 +2254,7 @@
 
     return mod;
 }
+#endif
 
 /*************************************************************************
  * 4. Utility functions for handling the interface between Vim and Python.