Hi,

I found that (g)vim.exe with +python3 on Win32 exports a symbol Py3Init_vim,
but the symbol doesn't need to be exported because only PyImport_AppendInittab()
uses Py3Init_vim.

I think that "PyMODINIT_FUNC" can be replaced by "static PyObject *".
Here is a reference for PyImport_AppendInittab().
http://docs.python.org/3/c-api/import.html#PyImport_AppendInittab

Attached patch fixes this problem.

Best regards,
Ken Takata

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
# HG changeset patch
# Parent bcd52b11e6d08b44a64e4249908420344753eb4f

diff --git a/src/if_python3.c b/src/if_python3.c
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -658,7 +658,7 @@
 
 static int PythonIO_Init(void);
 static void PythonIO_Fini(void);
-PyMODINIT_FUNC Py3Init_vim(void);
+static PyObject *Py3Init_vim(void);
 
 /******************************************************
  * 1. Python interpreter main program.
@@ -1782,8 +1782,8 @@
 
 static struct PyModuleDef vimmodule;
 
-#ifndef PROTO
-PyMODINIT_FUNC Py3Init_vim(void)
+    static PyObject *
+Py3Init_vim(void)
 {
     PyObject *mod;
     PyObject *tmp;
@@ -1833,7 +1833,6 @@
 
     return mod;
 }
-#endif
 
 /*************************************************************************
  * 4. Utility functions for handling the interface between Vim and Python.

Raspunde prin e-mail lui