diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-26 00:08:53 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-26 00:08:53 (GMT) |
commit | 2ead3d2448ea3a131df91fed5e88b5e64ee8d4e1 (patch) | |
tree | ec67a629755269b17cc95b583c3f60636f0b57f3 /Modules/_tracemalloc.c | |
parent | 7a5be14dd83dd9eabcd78d012b1dd38020d32bea (diff) | |
download | cpython-2ead3d2448ea3a131df91fed5e88b5e64ee8d4e1.zip cpython-2ead3d2448ea3a131df91fed5e88b5e64ee8d4e1.tar.gz cpython-2ead3d2448ea3a131df91fed5e88b5e64ee8d4e1.tar.bz2 |
Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1
Diffstat (limited to 'Modules/_tracemalloc.c')
-rw-r--r-- | Modules/_tracemalloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 5f45f3d..4d48ee8 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -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, |