summaryrefslogtreecommitdiffstats
path: root/src/if_python3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 5400dc6165..410dc1484f 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -321,6 +321,7 @@ static void end_dynamic_python3(void)
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 @@ static int py3_runtime_link_init(char *libname, int verbose)
}
}
- /* 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 Py_ssize_t RangeEnd;
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 @@ PyDoc_STRVAR(vim_module_doc,"vim python interface\n");
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 @@ static PyMODINIT_FUNC Py3Init_vim(void)
return mod;
}
+#endif
/*************************************************************************
* 4. Utility functions for handling the interface between Vim and Python.