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.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 59ef88f0aa..5400dc6165 100644
--- 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 interface\n");
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(). */