Mercurial > cpython-lru_cache-weakref
changeset 87571:f06a50c2bf85
Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Tue, 26 Nov 2013 01:08:53 +0100 |
| parents | cf2c4cd08dd9 |
| children | 02668e24d72d |
| files | Modules/_tracemalloc.c |
| diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Modules/_tracemalloc.c Tue Nov 26 01:06:02 2013 +0100 +++ b/Modules/_tracemalloc.c Tue Nov 26 01:08:53 2013 +0100 @@ -168,6 +168,7 @@ 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,
