]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-132775: Add _PyCode_GetVarCounts() (gh-133128)
authorEric Snow <ericsnowcurrently@gmail.com>
Wed, 30 Apr 2025 18:19:20 +0000 (12:19 -0600)
committerGitHub <noreply@github.com>
Wed, 30 Apr 2025 18:19:20 +0000 (18:19 +0000)
commit94b4fcd806e7b692955173d309ea3b70a193ad96
treee1ac874a97b3fca6f0ff763b1dd5eaaf9c4fca47
parent26c0248b54b6b2a5df51dd3da8c0ebb1b2958bc4
gh-132775: Add _PyCode_GetVarCounts() (gh-133128)

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.
Include/cpython/funcobject.h
Include/internal/pycore_code.h
Lib/test/test_code.py
Modules/_testinternalcapi.c
Objects/codeobject.c