gh-132775: Add _PyCode_VerifyStateless() (gh-133221)
"Stateless" code is a function or code object which does not rely on external state or internal state. It may rely on arguments and builtins, but not globals or a closure. I've left a comment in pycore_code.h that provides more detail. We also add _PyFunction_VerifyStateless(). The new functions will be used in several later changes that facilitate "sharing" functions and code objects between interpreters.
E
Eric Snow committed
d270bb57923e1e319d7d701d7bcf97a31721e2be
Parent: f610bbd
Committed by GitHub <noreply@github.com>
on 5/5/2025, 9:48:58 PM