Skip to content

Commit ead5d4f

Browse files
committed
fix tests
1 parent 6a5c49b commit ead5d4f

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

Lib/test/test_sys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ def func():
17031703
check(x, size('3PiccPPP' + INTERPRETER_FRAME + 'P'))
17041704
# function
17051705
def func(): pass
1706-
check(func, size('16Pi'))
1706+
check(func, size('17Pi'))
17071707
class c():
17081708
@staticmethod
17091709
def foo():

Objects/funcobject.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,13 +691,11 @@ func_set_code(PyObject *self, PyObject *value, void *Py_UNUSED(ignored))
691691
if (op->func_old_codes == NULL) {
692692
op->func_old_codes = PyList_New(0);
693693
if (op->func_old_codes == NULL) {
694-
PyErr_NoMemory();
695694
return -1;
696695
}
697696
}
698697

699698
if (PyList_Append(op->func_old_codes, op->func_code) < 0) {
700-
PyErr_NoMemory();
701699
return -1;
702700
}
703701

Objects/genobject.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ gen_traverse(PyObject *self, visitproc visit, void *arg)
9393
return err;
9494
}
9595
}
96-
else {
97-
// We still need to visit the code object when the frame is cleared to
98-
// ensure that it's kept alive if the reference is deferred.
99-
_Py_VISIT_STACKREF(gen->gi_iframe.f_executable);
100-
}
10196
/* No need to visit cr_origin, because it's just tuples/str/int, so can't
10297
participate in a reference cycle. */
10398
Py_VISIT(gen->gi_exc_state.exc_value);

0 commit comments

Comments
 (0)