summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-16 07:40:12 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-16 07:40:12 (GMT)
commit53fa8b2a4bbb589d3d761284c70f93e0f852df23 (patch)
tree950b373e6fde26fd3e5bb6282619ed6a38b8f31a /Python
parenta9e00d13cd5d547145ab065c166ca2075e06d6bf (diff)
downloadcpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.zip
cpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.tar.gz
cpython-53fa8b2a4bbb589d3d761284c70f93e0f852df23.tar.bz2
Fixed few compiler warnings.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval_gil.h4
-rw-r--r--Python/pylifecycle.c2
-rw-r--r--Python/pystate.c4
3 files changed, 5 insertions, 5 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;
}
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 25a4a60..2a36b53 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1258,7 +1258,7 @@ Py_FatalError(const char *msg)
PyErr_PrintEx(0);
}
else {
- tstate = _Py_atomic_load_relaxed(&_PyThreadState_Current);
+ tstate = (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current);
if (tstate != NULL) {
fputc('\n', stderr);
fflush(stderr);
diff --git a/Python/pystate.c b/Python/pystate.c
index 2ac2fd5..32a635c 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -403,7 +403,7 @@ tstate_delete_common(PyThreadState *tstate)
void
PyThreadState_Delete(PyThreadState *tstate)
{
- if (tstate == _Py_atomic_load_relaxed(&_PyThreadState_Current))
+ if (tstate == (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
Py_FatalError("PyThreadState_Delete: tstate is still current");
#ifdef WITH_THREAD
if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
@@ -662,7 +662,7 @@ PyThreadState_IsCurrent(PyThreadState *tstate)
{
/* Must be the tstate for this thread */
assert(PyGILState_GetThisThreadState()==tstate);
- return tstate == _Py_atomic_load_relaxed(&_PyThreadState_Current);
+ return tstate == (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current);
}
/* Internal initialization/finalization functions called by