René's URL Explorer Experiment


Title: gh-127545: Replace _Py_ALIGN_AS(V) by _Py_ALIGNED_DEF(N, T) by encukou · Pull Request #135209 · python/cpython · GitHub

Open Graph Title: gh-127545: Replace _Py_ALIGN_AS(V) by _Py_ALIGNED_DEF(N, T) by encukou · Pull Request #135209 · python/cpython

X Title: gh-127545: Replace _Py_ALIGN_AS(V) by _Py_ALIGNED_DEF(N, T) by encukou · Pull Request #135209 · python/cpython

Description: _Py_ALIGNED_DEF(N, T) might be a better way to make the various _Alignas alternatives, which behave in interesting ways, increase (rather than set) a variable's alignment. The standard alignas/_Alignas error out if they would decrease the alignment. To prevent that, they can be used again with the defined variable's type. The standard alignas/_Alignas can't be used on a struct definition, the workaround is to use it on one of the struct's members. MSVC declspec(aligned) only takes integer literals. MSVC declspec(aligned) had a bug when applied to a combined struct+member definition; a workaround is to separate the struct definition. This avoids a potentially ABI-breaking bug in older MSVC versions (which newer versions warn about, using code C5274). This PR does that for PyASCIIObject.state. Issue: gh-127545

Open Graph Description: _Py_ALIGNED_DEF(N, T) might be a better way to make the various _Alignas alternatives, which behave in interesting ways, increase (rather than set) a variable's alignment. The standard alignas/...

X Description: _Py_ALIGNED_DEF(N, T) might be a better way to make the various _Alignas alternatives, which behave in interesting ways, increase (rather than set) a variable's alignment. The standard alig...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0af0647f-34e2-db61-166c-cb955d206f6f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC132:3D9B0D:11996EB:19A130B:6A563868
html-safe-nonce0ccfadb83d3c6e217ef7d597b1804158a9c7bf2726eb94e12797d30e6b3bf53d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTMyOjNEOUIwRDoxMTk5NkVCOjE5QTEzMEI6NkE1NjM4NjgiLCJ2aXNpdG9yX2lkIjoiNTUxOTYwNTcyMzkxNzg1ODkyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd4882ecfc533c994548b5ddb307a6709d3d04d219ec071d1632e882beeb00747
hovercard-subject-tagpull_request:2573398766
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/135209/files
twitter:imagehttps://avatars.githubusercontent.com/u/302922?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/302922?s=400&v=4
og:image:alt_Py_ALIGNED_DEF(N, T) might be a better way to make the various _Alignas alternatives, which behave in interesting ways, increase (rather than set) a variable's alignment. The standard alignas/...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9d78ea552aac0685ca5f006d44f88166cbbf3bb96843f8da0c5a2c0b9908430b
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
release423b2fb76ac2b90de5ab599b7a76a0d2b2c83f24
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/135209/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F135209%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F135209%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/135209/files
Reloadhttps://github.com/python/cpython/pull/135209/files
Reloadhttps://github.com/python/cpython/pull/135209/files
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality 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
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:gc_crashhttps://github.com/encukou/cpython/tree/gc_crash
Conversation 8 https://github.com/python/cpython/pull/135209
Commits 6 https://github.com/python/cpython/pull/135209/commits
Checks 37 https://github.com/python/cpython/pull/135209/checks
Files changed https://github.com/python/cpython/pull/135209/files
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
gh-127545: Replace _Py_ALIGN_AS(V) by _Py_ALIGNED_DEF(N, T) https://github.com/python/cpython/pull/135209/files#top
Show all changes 6 commits https://github.com/python/cpython/pull/135209/files
392f6c5 Specify minimum PyGC_Head and PyObject alignment to fix build failure fthain Dec 3, 2024 https://github.com/python/cpython/pull/135209/commits/392f6c5bc8e9548e83b00d1ca6b2223345d8c2ec
e0156b0 Replace _Py_ALIGN_AS(V) by _Py_ALIGNED_DEF(N, T) encukou Jun 6, 2025 https://github.com/python/cpython/pull/135209/commits/e0156b0516ac4d125e480b81990eaf6549f193dc
512fe58 Actually make this a literal encukou Jun 6, 2025 https://github.com/python/cpython/pull/135209/commits/512fe5844e22a5639765416d67e6376880e4bba4
851cc3a Move comment to the appropriate place encukou Jun 7, 2025 https://github.com/python/cpython/pull/135209/commits/851cc3ad4135929771c4bcd7152fd75ac8617043
80801db Remove redundant comment encukou Jun 7, 2025 https://github.com/python/cpython/pull/135209/commits/80801dbe555e13abde5922f7a781f8a32e8cb0cc
6d7c805 Clarify units encukou Jun 10, 2025 https://github.com/python/cpython/pull/135209/commits/6d7c805d769cf93318953d512f277479638bc0d1
Clear filters https://github.com/python/cpython/pull/135209/files
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
Python.h https://github.com/python/cpython/pull/135209/files#diff-f60ef9db994347493c9ad11a939d46272a5b9a3d03e9aa22f186a87dd9ce8769
unicodeobject.h https://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
pycore_interp_structs.h https://github.com/python/cpython/pull/135209/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
object.h https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
pymacro.h https://github.com/python/cpython/pull/135209/files#diff-c33c79e156be4137aeaaa15bf4b5c7f023a78b6a54abd2d519e7cc88caed2cca
2024-12-04-10-00-35.gh-issue-127545.t0THjE.rst https://github.com/python/cpython/pull/135209/files#diff-cd38a792469f291d3901da57855b3019314af643f078d8386be156eacb0bdc62
Include/Python.hhttps://github.com/python/cpython/pull/135209/files#diff-f60ef9db994347493c9ad11a939d46272a5b9a3d03e9aa22f186a87dd9ce8769
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Include/Python.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
https://github.com/python/cpython/pull/135209/files#diff-f60ef9db994347493c9ad11a939d46272a5b9a3d03e9aa22f186a87dd9ce8769
https://github.com/python/cpython/pull/135209/files#diff-f60ef9db994347493c9ad11a939d46272a5b9a3d03e9aa22f186a87dd9ce8769
https://github.com/python/cpython/pull/135209/files#diff-f60ef9db994347493c9ad11a939d46272a5b9a3d03e9aa22f186a87dd9ce8769
Include/cpython/unicodeobject.hhttps://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Include/cpython/unicodeobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
https://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
https://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
https://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
https://github.com/python/cpython/pull/135209/files#diff-6be7f081fe6c5e9cbc89323a00399b291d1cda855bcb4c6eeaee0fac89c2f8dd
Include/internal/pycore_interp_structs.hhttps://github.com/python/cpython/pull/135209/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Include/internal/pycore_interp_structs.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
https://github.com/python/cpython/pull/135209/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
https://github.com/python/cpython/pull/135209/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
Include/object.hhttps://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Include/object.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
https://github.com/python/cpython/pull/135209/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
Include/pymacro.hhttps://github.com/python/cpython/pull/135209/files#diff-c33c79e156be4137aeaaa15bf4b5c7f023a78b6a54abd2d519e7cc88caed2cca
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Include/pymacro.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
https://github.com/python/cpython/pull/135209/files#diff-c33c79e156be4137aeaaa15bf4b5c7f023a78b6a54abd2d519e7cc88caed2cca
https://github.com/python/cpython/pull/135209/files#diff-c33c79e156be4137aeaaa15bf4b5c7f023a78b6a54abd2d519e7cc88caed2cca
Misc/NEWS.d/next/Build/2024-12-04-10-00-35.gh-issue-127545.t0THjE.rsthttps://github.com/python/cpython/pull/135209/files#diff-cd38a792469f291d3901da57855b3019314af643f078d8386be156eacb0bdc62
View file https://github.com/encukou/cpython/blob/6d7c805d769cf93318953d512f277479638bc0d1/Misc/NEWS.d/next/Build/2024-12-04-10-00-35.gh-issue-127545.t0THjE.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/135209/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/135209/files
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.