Skip to content

Commit dd930ef

Browse files
committed
2 parents f60d888 + 17b0e2a commit dd930ef

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

Doc/c-api/interp-lifecycle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ deleted. This can be done using interpreter views.
755755
.. versionadded:: next
756756
757757
758-
.. c:function:: PyInterpreterView *PyInterpreterView_FromMain()
758+
.. c:function:: PyInterpreterView *PyInterpreterView_FromMain(void)
759759
760760
Create a view for the main interpreter (the first and default
761761
interpreter in a Python process; see

Python/pylifecycle.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,12 +2349,8 @@ make_pre_finalization_calls(PyThreadState *tstate, int subinterpreters)
23492349
}
23502350
assert(!PyErr_Occurred());
23512351
}
2352-
else if (ret == Py_PARK_AGAIN) {
2353-
continue;
2354-
}
23552352
else {
2356-
assert(ret == Py_PARK_TIMEOUT);
2357-
Py_UNREACHABLE();
2353+
assert(ret == Py_PARK_AGAIN);
23582354
}
23592355
}
23602356

Python/pystate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,7 @@ PyInterpreterGuard_FromView(PyInterpreterView *view)
34523452
return NULL;
34533453
}
34543454

3455-
assert(guard == NULL || guard->interp != NULL);
3455+
assert(guard->interp != NULL);
34563456
return guard;
34573457
}
34583458

0 commit comments

Comments
 (0)