diff options
author | Peter Eisentraut | 2011-08-18 09:53:32 +0000 |
---|---|---|
committer | Peter Eisentraut | 2011-08-18 09:59:43 +0000 |
commit | e1f9aa4eaecd8107230df1a1b698e8caf0fba4f8 (patch) | |
tree | f1a04ca1d0ef7ceadd18c06898b09d5ecf4e824a /src/pl/plpython/plpython.c | |
parent | f684bcb5238c13c8ba5a3770f4d0856677f99b35 (diff) |
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.
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r-- | src/pl/plpython/plpython.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index b981dec7c2e..17c583ec357 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -4066,7 +4066,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; |