From: Victor Stinner Date: Tue, 26 Nov 2013 00:08:53 +0000 (+0100) Subject: Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1 X-Git-Tag: v3.4.0b2~475 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ead3d2448ea3a131df91fed5e88b5e64ee8d4e1;p=thirdparty%2FPython%2Fcpython.git Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1 --- diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 5f45f3d20f4a..4d48ee82d1da 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,