mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-131498: Cases generator: manage stacks automatically (GH-132074)
This commit is contained in:
parent
305be5fb1a
commit
7099c75550
15 changed files with 216 additions and 251 deletions
|
@ -71,6 +71,9 @@ _Py_stackref_close(_PyStackRef ref, const char *filename, int linenumber)
|
|||
}
|
||||
PyObject *obj;
|
||||
if (ref.index <= LAST_PREDEFINED_STACKREF_INDEX) {
|
||||
if (ref.index == 0) {
|
||||
_Py_FatalErrorFormat(__func__, "Passing NULL to PyStackRef_CLOSE at %s:%d\n", filename, linenumber);
|
||||
}
|
||||
// Pre-allocated reference to None, False or True -- Do not clear
|
||||
TableEntry *entry = _Py_hashtable_get(interp->open_stackrefs_table, (void *)ref.index);
|
||||
obj = entry->obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue