René's URL Explorer Experiment


Title: gh-91320: Add _Py_reinterpret_cast() macro by vstinner · Pull Request #91959 · python/cpython · GitHub

Open Graph Title: gh-91320: Add _Py_reinterpret_cast() macro by vstinner · Pull Request #91959 · python/cpython

X Title: gh-91320: Add _Py_reinterpret_cast() macro by vstinner · Pull Request #91959 · python/cpython

Description: Fix C++ compiler warnings about "old-style cast" (g++ -Wold-style-cast) in the Python C API. Use C++ reinterpret_cast<> and static_cast<> casts when the Python C API is used in C++. Example of fixed warning: Include/object.h:107:43: error: use of old-style cast to ‘PyObject*’ {aka ‘struct _object*’} [-Werror=old-style-cast] #define _PyObject_CAST(op) ((PyObject*)(op)) Add _Py_reinterpret_cast() and _Py_static_cast() macros.

Open Graph Description: Fix C++ compiler warnings about "old-style cast" (g++ -Wold-style-cast) in the Python C API. Use C++ reinterpret_cast<> and static_cast<> casts when the Python C API is used ...

X Description: Fix C++ compiler warnings about &quot;old-style cast&quot; (g++ -Wold-style-cast) in the Python C API. Use C++ reinterpret_cast&lt;&gt; and static_cast&lt;&gt; casts when t...

Opengraph URL: https://github.com/python/cpython/pull/91959

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8c74ca5c-4a3c-bde3-da91-8b4679227f7b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE258:12E4A1:89735F:C2EA0E:696A5179
html-safe-noncecb93af10a0989f48155addb32265994ed1a14ceb41ec48ab35212867661fdbf1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjU4OjEyRTRBMTo4OTczNUY6QzJFQTBFOjY5NkE1MTc5IiwidmlzaXRvcl9pZCI6IjI2MzM3NjczMDczNzk4ODg1MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7ae93faf994318b8cd92fcb6b2db2eb19fdcdeb7f7de52a26ecf4df5979a0959
hovercard-subject-tagpull_request:919534624
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/91959/files
twitter:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
og:image:altFix C++ compiler warnings about "old-style cast" (g++ -Wold-style-cast) in the Python C API. Use C++ reinterpret_cast<> and static_cast<> casts when the Python C API is used ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/91959/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F91959%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F91959%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/91959/files
Reloadhttps://github.com/python/cpython/pull/91959/files
Reloadhttps://github.com/python/cpython/pull/91959/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
Conversation 17 https://github.com/python/cpython/pull/91959
Commits 2 https://github.com/python/cpython/pull/91959/commits
Checks 0 https://github.com/python/cpython/pull/91959/checks
Files changed https://github.com/python/cpython/pull/91959/files
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
gh-91320: Add _Py_reinterpret_cast() macro https://github.com/python/cpython/pull/91959/files#top
Show all changes 2 commits https://github.com/python/cpython/pull/91959/files
06aeb11 gh-91320: Add _Py_reinterpret_cast() macro vstinner Apr 26, 2022 https://github.com/python/cpython/pull/91959/commits/06aeb11aec36dc20c8b441298eb0f6cfc47d14a5
01b1bae Fix typo in _PyCMethodObject_CAST() vstinner Apr 26, 2022 https://github.com/python/cpython/pull/91959/commits/01b1bae420c6b6ff87c4585f9d255f05fa5835b9
Clear filters https://github.com/python/cpython/pull/91959/files
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
abstract.h https://github.com/python/cpython/pull/91959/files#diff-cf6158859b32f9548b010233c5c8cd5ef7631a8080a45f8f72f09c61aa898483
listobject.h https://github.com/python/cpython/pull/91959/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
methodobject.h https://github.com/python/cpython/pull/91959/files#diff-8807e4727160217c09d96f09d5c647a101e4cff0b51db128b6240384154d2017
tupleobject.h https://github.com/python/cpython/pull/91959/files#diff-b3f4edd7ecf6b0c11ffb17413ae42103277f2c200b3bf52c6d3de89588f465ec
unicodeobject.h https://github.com/python/cpython/pull/91959/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
methodobject.h https://github.com/python/cpython/pull/91959/files#diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9d
object.h https://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
objimpl.h https://github.com/python/cpython/pull/91959/files#diff-cba22cdca191d42387ce16b30235bf2d36934a58a488f2b56d5bc6965e3a157d
pyport.h https://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
2022-04-26-16-51-31.gh-issue-91320.QDHmTv.rst https://github.com/python/cpython/pull/91959/files#diff-690c3e6c4b72c55871f2c0cb81909ba89dcb5c181ee3168605dddf396bde5462
Include/cpython/abstract.hhttps://github.com/python/cpython/pull/91959/files#diff-cf6158859b32f9548b010233c5c8cd5ef7631a8080a45f8f72f09c61aa898483
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/cpython/abstract.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-cf6158859b32f9548b010233c5c8cd5ef7631a8080a45f8f72f09c61aa898483
vstinnerhttps://github.com/vstinner
Apr 26, 2022https://github.com/python/cpython/pull/91959/files#r859213490
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/91959/files
https://github.com/python/cpython/pull/91959/files#diff-cf6158859b32f9548b010233c5c8cd5ef7631a8080a45f8f72f09c61aa898483
Include/cpython/listobject.hhttps://github.com/python/cpython/pull/91959/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/cpython/listobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
https://github.com/python/cpython/pull/91959/files#diff-b73b8cc4003f2dbbddf4abf0d810faae0af1a0a41c509b63f201f60bb8dfd31f
Include/cpython/methodobject.hhttps://github.com/python/cpython/pull/91959/files#diff-8807e4727160217c09d96f09d5c647a101e4cff0b51db128b6240384154d2017
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/cpython/methodobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-8807e4727160217c09d96f09d5c647a101e4cff0b51db128b6240384154d2017
https://github.com/python/cpython/pull/91959/files#diff-8807e4727160217c09d96f09d5c647a101e4cff0b51db128b6240384154d2017
Include/cpython/tupleobject.hhttps://github.com/python/cpython/pull/91959/files#diff-b3f4edd7ecf6b0c11ffb17413ae42103277f2c200b3bf52c6d3de89588f465ec
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/cpython/tupleobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-b3f4edd7ecf6b0c11ffb17413ae42103277f2c200b3bf52c6d3de89588f465ec
https://github.com/python/cpython/pull/91959/files#diff-b3f4edd7ecf6b0c11ffb17413ae42103277f2c200b3bf52c6d3de89588f465ec
Include/cpython/unicodeobject.hhttps://github.com/python/cpython/pull/91959/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/cpython/unicodeobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
https://github.com/python/cpython/pull/91959/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
Include/methodobject.hhttps://github.com/python/cpython/pull/91959/files#diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9d
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/methodobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9d
https://github.com/python/cpython/pull/91959/files#diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9d
Include/object.hhttps://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/object.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/91959/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
Include/objimpl.hhttps://github.com/python/cpython/pull/91959/files#diff-cba22cdca191d42387ce16b30235bf2d36934a58a488f2b56d5bc6965e3a157d
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/objimpl.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-cba22cdca191d42387ce16b30235bf2d36934a58a488f2b56d5bc6965e3a157d
https://github.com/python/cpython/pull/91959/files#diff-cba22cdca191d42387ce16b30235bf2d36934a58a488f2b56d5bc6965e3a157d
Include/pyport.hhttps://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Include/pyport.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
https://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
https://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
https://github.com/python/cpython/pull/91959/files#diff-4832eab2bfe1a8edc0ca7d7661126bd69d8f4e41916624e3ed48389b6ced6b02
Misc/NEWS.d/next/C API/2022-04-26-16-51-31.gh-issue-91320.QDHmTv.rsthttps://github.com/python/cpython/pull/91959/files#diff-690c3e6c4b72c55871f2c0cb81909ba89dcb5c181ee3168605dddf396bde5462
View file https://github.com/python/cpython/blob/01b1bae420c6b6ff87c4585f9d255f05fa5835b9/Misc/NEWS.d/next/C%20API/2022-04-26-16-51-31.gh-issue-91320.QDHmTv.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/91959/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.