mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-07 02:29:24 +02:00
Change PyInit_plpy to external linkage
Module initialization functions in Python 3 must have external linkage, because PyMODINIT_FUNC does dllexport on Windows-like platforms. Without this change, the build with Python 3 fails on Windows.
This commit is contained in:
parent
f85e4057cf
commit
7b1509d562
@ -4026,7 +4026,13 @@ PLy_add_exceptions(PyObject *plpy)
|
||||
}
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static PyMODINIT_FUNC
|
||||
/*
|
||||
* Must have external linkage, because PyMODINIT_FUNC does dllexport on
|
||||
* Windows-like platforms.
|
||||
*/
|
||||
PyMODINIT_FUNC PyInit_plpy(void);
|
||||
|
||||
PyMODINIT_FUNC
|
||||
PyInit_plpy(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
Loading…
Reference in New Issue
Block a user