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

Commitd4c2425

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 parent1853e12 commitd4c2425

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
@@ -3205,7 +3205,13 @@ PLy_spi_execute_fetch_result(SPITupleTable *tuptable, int rows, int status)
32053205
*/
32063206

32073207
#ifPY_MAJOR_VERSION >=3
3208-
staticPyMODINIT_FUNC
3208+
/*
3209+
* Must have external linkage, because PyMODINIT_FUNC does dllexport on
3210+
* Windows-like platforms.
3211+
*/
3212+
PyMODINIT_FUNCPyInit_plpy(void);
3213+
3214+
PyMODINIT_FUNC
32093215
PyInit_plpy(void)
32103216
{
32113217
returnPyModule_Create(&PLy_module);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp