mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Backout changeset 46393019b650
test_capi is failing and the fix is not trivial, I prefer to revert
This commit is contained in:
parent
775632ba10
commit
441adb8c57
7 changed files with 30 additions and 24 deletions
|
@ -168,11 +168,14 @@ 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, REENTRANT);
|
||||
PyThread_set_key_value(tracemalloc_reentrant_key,
|
||||
REENTRANT);
|
||||
}
|
||||
else {
|
||||
assert(PyThread_get_key_value(tracemalloc_reentrant_key) == REENTRANT);
|
||||
PyThread_set_key_value(tracemalloc_reentrant_key, NULL);
|
||||
/* FIXME: PyThread_set_key_value() cannot be used to set the flag
|
||||
to zero, because it does nothing if the variable has already
|
||||
a value set. */
|
||||
PyThread_delete_key_value(tracemalloc_reentrant_key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue