Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b1509d

Browse files
committed
Change PyInit_plpy to external linkage
Module initialization functions in Python 3 must have externallinkage, because PyMODINIT_FUNC does dllexport on Windows-likeplatforms. Without this change, the build with Python 3 fails onWindows.
1 parentf85e405 commit7b1509d

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
@@ -4026,7 +4026,13 @@ PLy_add_exceptions(PyObject *plpy)
40264026
}
40274027

40284028
#ifPY_MAJOR_VERSION >=3
4029-
staticPyMODINIT_FUNC
4029+
/*
4030+
* Must have external linkage, because PyMODINIT_FUNC does dllexport on
4031+
* Windows-like platforms.
4032+
*/
4033+
PyMODINIT_FUNCPyInit_plpy(void);
4034+
4035+
PyMODINIT_FUNC
40304036
PyInit_plpy(void)
40314037
{
40324038
PyObject*m;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp