Mercurial > vim
diff src/if_python3.c @ 2342:f6540762173d vim73
Fixes and improvements for MS-Windows build.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 18 Jul 2010 21:42:34 +0200 |
parents | 99c1eba60b2d |
children | 06feaf4fe36a |
line wrap: on
line diff
--- 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 *l } } - /* 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 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.