Skip to content

Commit e1f9aa4

Browse files
committed
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.
1 parent f684bcb commit e1f9aa4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pl/plpython/plpython.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4066,7 +4066,13 @@ PLy_add_exceptions(PyObject *plpy)
40664066
}
40674067

40684068
#if PY_MAJOR_VERSION >= 3
4069-
static PyMODINIT_FUNC
4069+
/*
4070+
* Must have external linkage, because PyMODINIT_FUNC does dllexport on
4071+
* Windows-like platforms.
4072+
*/
4073+
PyMODINIT_FUNC PyInit_plpy(void);
4074+
4075+
PyMODINIT_FUNC
40704076
PyInit_plpy(void)
40714077
{
40724078
PyObject *m;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy