Make automatic prototype generation work with more interfaces.
diff --git a/src/if_python3.c b/src/if_python3.c
index 59ef88f..5400dc6 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 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 @@
}
/*
- * ":python"
+ * ":python3"
*/
void ex_python3(exarg_T *eap)
{
@@ -650,7 +652,7 @@
#define BUFFER_SIZE 2048
/*
- * ":pyfile"
+ * ":py3file"
*/
void
ex_py3file(exarg_T *eap)
@@ -2220,7 +2222,7 @@
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(). */