Skip to content

Conversation

@arhadthedev
Copy link
Member

@arhadthedevarhadthedev 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
MemberAuthor

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

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

@arhadthedev
Copy link
MemberAuthor

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

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

Thank you!

@arhadthedevarhadthedev 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