diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 07:40:12 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 07:40:12 (GMT) |
commit | 53fa8b2a4bbb589d3d761284c70f93e0f852df23 (patch) | |
tree | 950b373e6fde26fd3e5bb6282619ed6a38b8f31a /Python/ceval_gil.h | |
parent | a9e00d13cd5d547145ab065c166ca2075e06d6bf (diff) | |
download | cpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.zip cpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.tar.gz cpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.tar.bz2 |
Fixed few compiler warnings.
Diffstat (limited to 'Python/ceval_gil.h')
-rw-r--r-- | Python/ceval_gil.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h index 2702d5c..4db56b6 100644 --- a/Python/ceval_gil.h +++ b/Python/ceval_gil.h @@ -191,7 +191,7 @@ static void drop_gil(PyThreadState *tstate) if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) { MUTEX_LOCK(switch_mutex); /* Not switched yet => wait */ - if (_Py_atomic_load_relaxed(&gil_last_holder) == tstate) { + if ((PyThreadState*)_Py_atomic_load_relaxed(&gil_last_holder) == tstate) { RESET_GIL_DROP_REQUEST(); /* NOTE: if COND_WAIT does not atomically start waiting when releasing the mutex, another thread can run through, take @@ -239,7 +239,7 @@ _ready: _Py_atomic_store_relaxed(&gil_locked, 1); _Py_ANNOTATE_RWLOCK_ACQUIRED(&gil_locked, /*is_write=*/1); - if (tstate != _Py_atomic_load_relaxed(&gil_last_holder)) { + if (tstate != (PyThreadState*)_Py_atomic_load_relaxed(&gil_last_holder)) { _Py_atomic_store_relaxed(&gil_last_holder, tstate); ++gil_switch_number; } |