diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-12 14:35:46 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-12 14:35:46 +0200 |
commit | b51bd875193c84e51afb907a0c8ff6091fc95d5f (patch) | |
tree | d2e3c85d92f1ae680f0c90b4b4fc88cce58ecba0 /Python/condvar.h | |
parent | e7ed9c7bd2204dd48d67eb7b14813c0338a85a0c (diff) | |
parent | f246749b9aa9cdb1f05eca29b7eef6a04e05fc8b (diff) | |
download | cpython-b51bd875193c84e51afb907a0c8ff6091fc95d5f.tar.gz |
Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters.
Diffstat (limited to 'Python/condvar.h')
-rw-r--r-- | Python/condvar.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/condvar.h b/Python/condvar.h index ef818c4d4b..ced910fbea 100644 --- a/Python/condvar.h +++ b/Python/condvar.h @@ -1,4 +1,4 @@ -/* +/* * Portable condition variable support for windows and pthreads. * Everything is inline, this header can be included where needed. * @@ -105,7 +105,7 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, PY_LONG_LONG us) return 1; else if (r) return -1; - else + else return 0; } @@ -238,7 +238,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms) cv->waiting++; PyMUTEX_UNLOCK(cs); /* "lost wakeup bug" would occur if the caller were interrupted here, - * but we are safe because we are using a semaphore wich has an internal + * but we are safe because we are using a semaphore which has an internal * count. */ wait = WaitForSingleObjectEx(cv->sem, ms, FALSE); @@ -255,7 +255,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms) * a new thread comes along, it will pass right throuhgh, having * adjusted it to (waiting == 0 && sem.count == 0). */ - + if (wait == WAIT_FAILED) return -1; /* return 0 on success, 1 on timeout */ |