Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall #94702

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented Jul 9, 2022

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
Copy link
Member Author

arhadthedev commented Jul 9, 2022

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?

@arhadthedev
Copy link
Member Author

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

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

🤖 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 bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 12, 2022
@encukou encukou merged commit fc21a43 into python:main Jul 13, 2022
@encukou
Copy link
Member

encukou commented Jul 13, 2022

Thank you!

@arhadthedev arhadthedev deleted the testcapi-inconsistent-linkage branch July 13, 2022 11:24
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