Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1
This commit is contained in:
parent
7a5be14dd8
commit
2ead3d2448
|
@ -168,6 +168,7 @@ get_reentrant(void)
|
||||||
static void
|
static void
|
||||||
set_reentrant(int reentrant)
|
set_reentrant(int reentrant)
|
||||||
{
|
{
|
||||||
|
assert(reentrant == 0 || reentrant == 1);
|
||||||
if (reentrant) {
|
if (reentrant) {
|
||||||
assert(PyThread_get_key_value(tracemalloc_reentrant_key) == NULL);
|
assert(PyThread_get_key_value(tracemalloc_reentrant_key) == NULL);
|
||||||
PyThread_set_key_value(tracemalloc_reentrant_key,
|
PyThread_set_key_value(tracemalloc_reentrant_key,
|
||||||
|
|
Loading…
Reference in New Issue