mirror of https://github.com/python/cpython
gh-101101: Fix test_code_extra to reset value for refleak test (gh-102350)
This commit is contained in:
parent
60597439ef
commit
ed55c69ebd
|
@ -92,7 +92,11 @@ test_code_extra(PyObject* self, PyObject *Py_UNUSED(callable))
|
|||
goto finally;
|
||||
}
|
||||
assert ((uintptr_t)extra == 77);
|
||||
|
||||
// Revert to initial code extra value.
|
||||
res = PyUnstable_Code_SetExtra(test_func_code, code_extra_index, NULL);
|
||||
if (res < 0) {
|
||||
goto finally;
|
||||
}
|
||||
result = Py_NewRef(Py_None);
|
||||
finally:
|
||||
Py_XDECREF(test_module);
|
||||
|
|
Loading…
Reference in New Issue