← 返回首页
gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall by arhadthedev · Pull Request #94702 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall#94702

Merged
encukou merged 2 commits into
python:mainfrom
arhadthedev:testcapi-inconsistent-linkage
Jul 13, 2022
Merged

gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall#94702
encukou merged 2 commits into
python:mainfrom
arhadthedev:testcapi-inconsistent-linkage

Conversation

arhadthedev commented Jul 9, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Addresses this:

##[warning]D:\a\cpython\cpython\Modules_testcapi\vectorcall.c(233,42): warning C4273: '_PyTestCapi_Init_Vectorcall': inconsistent dll linkage [D:\a\cpython\cpython\PCbuild_testcapi.vcxproj]
D:\a\cpython\cpython\Modules_testcapi\parts.h(3,17): message : see previous definition of '_PyTestCapi_Init_Vectorcall' (compiling source file ..\Modules_testcapi\vectorcall.c) [D:\a\cpython\cpython\PCbuild_testcapi.vcxproj]

A follow-up to gh-94549 so cc @encukou.

arhadthedev commented Jul 9, 2022
edited
Loading

Copy link
Copy Markdown
Member Author

Hm...

error C2491: '_PyTestCapi_Init_Vectorcall': definition of dllimport function not allowed

In Python\getargs.c this works perfectly:

PyAPI_FUNC(int) _PyArg_Parse_SizeT(PyObject *args, const char *format, ...) {

Do we need to declare such an internal function as importable/exportable?

Copy link
Copy Markdown
Member Author

I've made the function non-exportable, now it links with no error.

encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 12, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit e0670d6 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 12, 2022
encukou merged commit fc21a43 into python:main Jul 13, 2022

encukou commented Jul 13, 2022

Copy link
Copy Markdown
Member

Thank you!

arhadthedev deleted the testcapi-inconsistent-linkage branch July 13, 2022 11:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.