Do not export Py3Init_vim()

12 views
Skip to first unread message

Ken Takata

unread,
Nov 16, 2012, 6:14:49 PM11/16/12
to vim...@googlegroups.com
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

do-not-export-Py3Init_vim.patch

Bram Moolenaar

unread,
Nov 17, 2012, 8:26:42 AM11/17/12
to Ken Takata, vim...@googlegroups.com
Thanks, I'll add it to my todo list.

--
Due knot trussed yore spell chequer two fined awl miss steaks.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages