From: Peter Eisentraut Date: Thu, 18 Aug 2011 09:53:32 +0000 (+0300) Subject: Change PyInit_plpy to external linkage X-Git-Tag: REL9_1_RC1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b1509d56256fa391d4ae71288be194923a41947;p=postgresql 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. --- diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index b007f4ac6b..2737e5863a 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -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;