Skip to content

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

@arhadthedevarhadthedev commented Jul 9, 2022

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

arhadthedev commented Jul 9, 2022

Copy link
Copy Markdown
MemberAuthor

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, constchar *format, ...)
{

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

@arhadthedev

Copy link
Copy Markdown
MemberAuthor

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

@bedevere-bot

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-botbedevere-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:mainJul 13, 2022
@encukou

Copy link
Copy Markdown
Member

Thank you!

@arhadthedev
arhadthedev deleted the testcapi-inconsistent-linkage branch July 13, 2022 11:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@arhadthedev@bedevere-bot@encukou@kumaraditya303