Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-132775: Add _PyCode_GetVarCounts()#133128
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
gh-132775: Add _PyCode_GetVarCounts() #133128
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ericsnowcurrently commented Apr 29, 2025 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
Objects/codeobject.c Outdated
| // Get the unbound counts. | ||
| structco_unbound_countsunbound={ | ||
| .total=PyTuple_GET_SIZE(co->co_names), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiler warning here
iritkatriel commented Apr 30, 2025
LGTM. But I'd run the refleaks buildbots before merging. |
94b4fcd into python:mainUh oh!
There was an error while loading. Please reload this page.
bedevere-bot commented Apr 30, 2025
|
bedevere-bot commented Apr 30, 2025
|
ericsnowcurrently commented May 1, 2025
FYI, I'm looking into the failures. |
This reverts commit 94b4fcd.
This reverts commit 811edcf (pythongh-133128).
This reverts commit 811edcf (pythongh-133232), which itself reverted the original commit 811edcf (pythongh-133128). We reverted the original change due to failing s390 builds (a big-endian architecture). It ended up that I had not accommodated op caches.
This helper is useful in a variety of ways, including in demonstrating how the different counts relate to one another.
It will be used in a later change to help identify if a function is "stateless", meaning it doesn't have any free vars or globals.
Note that a majority of this change is tests.