René's URL Explorer Experiment


Title: gh-94731: Revert to C-style casts for _Py_CAST by encukou · Pull Request #94782 · python/cpython · GitHub

Open Graph Title: gh-94731: Revert to C-style casts for _Py_CAST by encukou · Pull Request #94782 · python/cpython

X Title: gh-94731: Revert to C-style casts for _Py_CAST by encukou · Pull Request #94782 · python/cpython

Description: This reverts some changes from #91321 Issue: _PyObject_CAST breaks code which assumed a static/dynamic casting #94731

Open Graph Description: This reverts some changes from #91321 Issue: _PyObject_CAST breaks code which assumed a static/dynamic casting #94731

X Description: This reverts some changes from #91321 Issue: _PyObject_CAST breaks code which assumed a static/dynamic casting #94731

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:6b6cbccb-524b-3425-bec4-225d70ebc2cf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id961E:214CC9:AA1902:F10334:696A5F4C
html-safe-noncede8460ae98cf54daed48b042015baab37edda4f084f2af0662a1906fe9338af4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjFFOjIxNENDOTpBQTE5MDI6RjEwMzM0OjY5NkE1RjRDIiwidmlzaXRvcl9pZCI6IjYxMzM5NDEwNDgzMDUxNDc3MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacdef39640c5511c40a69556d8b182b03e08d8da231ebd8370efbc49f36176fd07
hovercard-subject-tagpull_request:994455710
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/94782/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/ba22e735a96d29203703da3fd33761defff4b7d956f35cc79104ae24eea98fac/python/cpython/pull/94782
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ba22e735a96d29203703da3fd33761defff4b7d956f35cc79104ae24eea98fac/python/cpython/pull/94782
og:image:altThis reverts some changes from #91321 Issue: _PyObject_CAST breaks code which assumed a static/dynamic casting #94731
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameencukou
hostnamegithub.com
expected-hostnamegithub.com
None9b7735a184970dd9333b2cbe036c8f3c0a9108c64aaa93827c5a64fc70993392
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release87cbd411c2982752221b5751d583a515b23bf5fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/94782#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F94782
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%2F94782
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/94782
Reloadhttps://github.com/python/cpython/pull/94782
Reloadhttps://github.com/python/cpython/pull/94782
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/94782
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/94782
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
Jump to bottomhttps://github.com/python/cpython/pull/94782#issue-comment-box
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:c-style-casthttps://github.com/encukou/cpython/tree/c-style-cast
gh-94731: Revert to C-style casts for _Py_CAST https://github.com/python/cpython/pull/94782#top
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:c-style-casthttps://github.com/encukou/cpython/tree/c-style-cast
Conversation 7 https://github.com/python/cpython/pull/94782
Commits 8 https://github.com/python/cpython/pull/94782/commits
Checks 0 https://github.com/python/cpython/pull/94782/checks
Files changed https://github.com/python/cpython/pull/94782/files
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/encukou
encukouhttps://github.com/encukou
Jul 12, 2022https://github.com/python/cpython/pull/94782#issue-1302250337
Please reload this pagehttps://github.com/python/cpython/pull/94782
#91321https://github.com/python/cpython/issues/91321
_PyObject_CAST breaks code which assumed a static/dynamic casting #94731https://github.com/python/cpython/issues/94731
Please reload this pagehttps://github.com/python/cpython/pull/94782
encukouhttps://github.com/encukou
July 12, 2022 17:41https://github.com/python/cpython/pull/94782#commits-pushed-f09b8c6
https://github.com/encukou
https://github.com/da-woods
pythongh-94731https://github.com/python/cpython/issues/94731
: Add a failing testhttps://github.com/python/cpython/pull/94782/commits/f09b8c638bf07a3bfa605d62baa4fa18a47a848e
f09b8c6https://github.com/python/cpython/pull/94782/commits/f09b8c638bf07a3bfa605d62baa4fa18a47a848e
https://github.com/encukou
pythongh-94731https://github.com/python/cpython/issues/94731
: Use C-style casts for _Py_CAST, even in C++https://github.com/python/cpython/pull/94782/commits/3faf13d16cc6b55573a17a8eca5a571256053e57
3faf13dhttps://github.com/python/cpython/pull/94782/commits/3faf13d16cc6b55573a17a8eca5a571256053e57
https://github.com/encukou
Add a blurbhttps://github.com/python/cpython/pull/94782/commits/b3b4ec8f1eec912cb5714affc2bc448784d25bfc
b3b4ec8https://github.com/python/cpython/pull/94782/commits/b3b4ec8f1eec912cb5714affc2bc448784d25bfc
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Jul 12, 2022https://github.com/python/cpython/pull/94782#event-6978836807
https://github.com/encukou
encukouhttps://github.com/encukou
Jul 12, 2022 https://github.com/python/cpython/pull/94782#ref-pullrequest-1184842159
gh-91321: Add _testcppext C++ extension #32175 https://github.com/python/cpython/pull/32175
https://github.com/encukou
encukouhttps://github.com/encukou
needs backport to 3.11 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.11%22
Jul 12, 2022https://github.com/python/cpython/pull/94782#event-6978853858
https://github.com/encukou
Also allow the -Wzero-as-null-pointer-constant warninghttps://github.com/python/cpython/pull/94782/commits/498e8bbac1c0767b1c02b674a8af20f275d247e5
498e8bbhttps://github.com/python/cpython/pull/94782/commits/498e8bbac1c0767b1c02b674a8af20f275d247e5
https://github.com/encukou
encukouhttps://github.com/encukou
Jul 13, 2022 https://github.com/python/cpython/pull/94782#ref-issue-1300226815
_PyObject_CAST breaks code which assumed a static/dynamic casting #94731 https://github.com/python/cpython/issues/94731
https://github.com/encukou
encukouhttps://github.com/encukou
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6983619700
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Jul 13, 2022https://github.com/python/cpython/pull/94782#issuecomment-1182886361
@encukouhttps://github.com/encukou
498e8bbhttps://github.com/python/cpython/commit/498e8bbac1c0767b1c02b674a8af20f275d247e5
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6983620044
https://github.com/encukou
Workaround for C++ compilers that don't support designated initializershttps://github.com/python/cpython/pull/94782/commits/b13e464eb086b7bc8c43485daf68d69fe05d57c8
b13e464https://github.com/python/cpython/pull/94782/commits/b13e464eb086b7bc8c43485daf68d69fe05d57c8
https://github.com/encukou
encukouhttps://github.com/encukou
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6984572991
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Jul 13, 2022https://github.com/python/cpython/pull/94782#issuecomment-1183021327
@encukouhttps://github.com/encukou
b13e464https://github.com/python/cpython/commit/b13e464eb086b7bc8c43485daf68d69fe05d57c8
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6984573309
https://github.com/da-woods
da-woodshttps://github.com/da-woods
Jul 13, 2022 https://github.com/python/cpython/pull/94782#pullrequestreview-1037254196
View reviewed changes https://github.com/python/cpython/pull/94782/files/b13e464eb086b7bc8c43485daf68d69fe05d57c8
Lib/test/_testcppext.cpphttps://github.com/python/cpython/pull/94782/files/b13e464eb086b7bc8c43485daf68d69fe05d57c8#diff-089d3dec7de1b32b3ce38ef910b9116d0c5a5645700b84fc66fc1833561b20f6
da-woodshttps://github.com/da-woods
Jul 13, 2022https://github.com/python/cpython/pull/94782#discussion_r920003169
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/94782
encukouhttps://github.com/encukou
Jul 13, 2022https://github.com/python/cpython/pull/94782#discussion_r920098553
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/94782
encukouhttps://github.com/encukou
July 13, 2022 14:37https://github.com/python/cpython/pull/94782#commits-pushed-c6945f1
https://github.com/encukou
Rename the type variable (ipotype was a hold-over from the original r…https://github.com/python/cpython/pull/94782/commits/c6945f141cead44f29aec85cb90cc0b8e89be650
c6945f1https://github.com/python/cpython/pull/94782/commits/c6945f141cead44f29aec85cb90cc0b8e89be650
https://github.com/encukou
Punt on C++ sanitizing builds for nowhttps://github.com/python/cpython/pull/94782/commits/713bf7d00db5734bae0d46584221cf0a34139061
713bf7dhttps://github.com/python/cpython/pull/94782/commits/713bf7d00db5734bae0d46584221cf0a34139061
https://github.com/encukou
Make the skip work if PY_CFLAGS is not sethttps://github.com/python/cpython/pull/94782/commits/021c03dbfc2128291650b096e1610c95c9277d36
021c03dhttps://github.com/python/cpython/pull/94782/commits/021c03dbfc2128291650b096e1610c95c9277d36
https://github.com/encukou
encukouhttps://github.com/encukou
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6987142811
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Jul 13, 2022https://github.com/python/cpython/pull/94782#issuecomment-1183381254
@encukouhttps://github.com/encukou
021c03dhttps://github.com/python/cpython/commit/021c03dbfc2128291650b096e1610c95c9277d36
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
🔨 test-with-buildbots https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22%3Ahammer%3A%20test-with-buildbots%22
Jul 13, 2022https://github.com/python/cpython/pull/94782#event-6987143134
https://github.com/encukou
encukouhttps://github.com/encukou
6cbb57fhttps://github.com/python/cpython/commit/6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e
Jul 14, 2022https://github.com/python/cpython/pull/94782#event-6992838427
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Jul 14, 2022https://github.com/python/cpython/pull/94782#event-6992838736
https://github.com/miss-islington
miss-islingtonhttps://github.com/miss-islington
Jul 14, 2022https://github.com/python/cpython/pull/94782#issuecomment-1184243880
@encukouhttps://github.com/encukou
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/encukou
encukouhttps://github.com/encukou
July 14, 2022 09:57https://github.com/python/cpython/pull/94782#event-6992838897
miss-islingtonhttps://github.com/miss-islington
Jul 14, 2022 https://github.com/python/cpython/pull/94782#ref-commit-426166c
https://github.com/encukou
https://github.com/miss-islington
pythongh-94731https://github.com/python/cpython/issues/94731
: Revert to C-style casts for _Py_CAST (https://github.com/miss-islington/cpython/commit/426166c4b1087b691c6c79ef79b5321dbfab0b17
pythonGH-94782https://github.com/python/cpython/pull/94782
)https://github.com/miss-islington/cpython/commit/426166c4b1087b691c6c79ef79b5321dbfab0b17
426166chttps://github.com/miss-islington/cpython/commit/426166c4b1087b691c6c79ef79b5321dbfab0b17
6cbb57fhttps://github.com/miss-islington/cpython/commit/6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
Jul 14, 2022https://github.com/python/cpython/pull/94782#issuecomment-1184244130
GH-94849https://github.com/python/cpython/pull/94849
3.11 branchhttps://github.com/python/cpython/tree/3.11
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
needs backport to 3.11 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.11%22
Jul 14, 2022https://github.com/python/cpython/pull/94782#event-6992840387
encukouhttps://github.com/encukou
Jul 15, 2022 https://github.com/python/cpython/pull/94782#ref-commit-d9107aa
https://github.com/miss-islington
https://github.com/da-woods
gh-94731https://github.com/python/cpython/issues/94731
: Revert to C-style casts for _Py_CAST (https://github.com/python/cpython/commit/d9107aa0157a2ff6741b9aa2f78759e90f522bd7
GH-94782https://github.com/python/cpython/pull/94782
) (https://github.com/python/cpython/commit/d9107aa0157a2ff6741b9aa2f78759e90f522bd7
#94849https://github.com/python/cpython/pull/94849
)https://github.com/python/cpython/commit/d9107aa0157a2ff6741b9aa2f78759e90f522bd7
d9107aahttps://github.com/python/cpython/commit/d9107aa0157a2ff6741b9aa2f78759e90f522bd7
6cbb57fhttps://github.com/python/cpython/commit/6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 22, 2022 https://github.com/python/cpython/pull/94782#ref-issue-1382657845
PEP 670: Convert static inline functions to functions #97016 https://github.com/python/cpython/issues/97016
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F94782
https://github.com/da-woods
da-woods https://github.com/da-woods
https://github.com/python/cpython/pull/94782/files/b13e464eb086b7bc8c43485daf68d69fe05d57c8
Please reload this pagehttps://github.com/python/cpython/pull/94782
https://github.com/encukou
https://github.com/bedevere-bot
https://github.com/miss-islington
https://github.com/da-woods
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.