projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f85e405
)
Change PyInit_plpy to external linkage
author
Peter Eisentraut
<peter_e@gmx.net>
Thu, 18 Aug 2011 09:53:32 +0000
(12:53 +0300)
committer
Peter Eisentraut
<peter_e@gmx.net>
Thu, 18 Aug 2011 10:41:56 +0000
(13:41 +0300)
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.
src/pl/plpython/plpython.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index b007f4ac6b5cab8080206f37e4dd35140ad37df1..2737e5863a4b856350aa3ebb71cc5efbc16c41c3 100644
(file)
--- 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;