mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1
This commit is contained in:
parent
7a5be14dd8
commit
2ead3d2448
1 changed files with 1 additions and 0 deletions
|
@ -168,6 +168,7 @@ get_reentrant(void)
|
|||
static void
|
||||
set_reentrant(int reentrant)
|
||||
{
|
||||
assert(reentrant == 0 || reentrant == 1);
|
||||
if (reentrant) {
|
||||
assert(PyThread_get_key_value(tracemalloc_reentrant_key) == NULL);
|
||||
PyThread_set_key_value(tracemalloc_reentrant_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue