Mercurial > vim
diff src/if_python3.c @ 2340:99c1eba60b2d vim73
Make automatic prototype generation work with more interfaces.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 18 Jul 2010 18:04:50 +0200 |
parents | ea4bf6df1a8a |
children | f6540762173d |
line wrap: on
line diff
--- a/src/if_python3.c +++ b/src/if_python3.c @@ -42,19 +42,21 @@ # undef _DEBUG #endif -#ifdef HAVE_STDARG_H -# undef HAVE_STDARG_H /* Python's config.h defines it as well. */ -#endif - #define PY_SSIZE_T_CLEAN #ifdef F_BLANK # undef F_BLANK #endif +#ifdef HAVE_STDARG_H +# undef HAVE_STDARG_H /* Python's config.h defines it as well. */ +#endif #ifdef _POSIX_C_SOURCE /* defined in feature.h */ # undef _POSIX_C_SOURCE #endif +#ifdef _XOPEN_SOURCE +# undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */ +#endif #include <Python.h> #if defined(MACOS) && !defined(MACOS_X_UNIX) @@ -436,7 +438,7 @@ static Py_ssize_t RangeEnd; static void PythonIO_Flush(void); static int PythonIO_Init(void); static void PythonIO_Fini(void); -PyMODINIT_FUNC Py3Init_vim(void); +static PyMODINIT_FUNC Py3Init_vim(void); /* Utility functions for the vim/python interface * ---------------------------------------------- @@ -630,7 +632,7 @@ theend: } /* - * ":python" + * ":python3" */ void ex_python3(exarg_T *eap) { @@ -650,7 +652,7 @@ void ex_python3(exarg_T *eap) #define BUFFER_SIZE 2048 /* - * ":pyfile" + * ":py3file" */ void ex_py3file(exarg_T *eap) @@ -2220,7 +2222,7 @@ PyDoc_STRVAR(vim_module_doc,"vim python static struct PyModuleDef vimmodule; -PyMODINIT_FUNC Py3Init_vim(void) +static PyMODINIT_FUNC Py3Init_vim(void) { PyObject *mod; /* The special value is removed from sys.path in Python3_Init(). */