Skip to content

gh-111178: fix clang-cl compilation of Modules/mmapmodule.c #130446

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

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Feb 22, 2025

After #129784 clang-cl fails with a compilation error for mmap__sizeof__method in Modules/mmapmodule.c:

..\Modules\mmapmodule.c(1201,25): error : incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, void *)' (aka 's
truct _object *(struct _object *, void *)') [-Wincompatible-function-pointer-types] [e:\cpython_clang\PCbuild\pythoncore.vcxproj]

I think this is a skip-news.

@picnixz
Copy link
Member

picnixz commented Feb 22, 2025

@vstinner

I'd like to merge this one with title:

gh-111178: fix clang-cl compilation of `Modules/mmapmodule.c` post gh-129784 (#130446)

and commit body:

The `PyCFunction` cast on `mmap__sizeof__method` was removed but the method was not updated accordingly.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@picnixz picnixz merged commit 65b339c into python:main Feb 22, 2025
45 checks passed
@picnixz
Copy link
Member

picnixz commented Feb 22, 2025

Thanks for the fix. I needed to fix some UBSan issues without any IDE or compiler support so it wasn't always easy :')

@chris-eibl chris-eibl deleted the clang-cl_fix_for_mmapmodule.c branch February 23, 2025 07:44
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.

3 participants