Skip to content

Commit 0931462

Browse files
committed
Clarify two comments
1 parent e6354c3 commit 0931462

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎Lib/test/test_tcl.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ def test_passing_deeply_nested(self):
589589
def test_returning_deeply_nested(self):
590590
if not self.wantobjects:
591591
self.skipTest('requires wantobjects')
592-
# The interpreter can only be used in the thread that created it.
592+
# run_with_limited_c_stack() runs the test in a new thread, and a
593+
# Tcl interpreter can only be used in the thread that created it.
593594
interp = Tcl()
594595
interp.eval('set x a; for {set i 0} {$i < %d} {incr i} {set x [list $x]}'
595596
% support.exceeds_recursion_limit())

‎Modules/_tkinter.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,9 @@ TupleAsObj(PyObject *value, int wrapped, int depth)
10781078
for (Py_ssize_t i = 0; i < size; i++) {
10791079
Tcl_Obj *item = AsObjNested(PyTuple_GET_ITEM(value, i), depth + 1);
10801080
if (item == NULL) {
1081-
/* Release the already converted items. */
1081+
/* Free the already converted items. A new Tcl object has a
1082+
zero reference count, so it must be acquired before it can
1083+
be released. */
10821084
while (--i >= 0) {
10831085
Tcl_IncrRefCount(argv[i]);
10841086
Tcl_DecrRefCount(argv[i]);

0 commit comments

Comments
 (0)