cpython: 9a61be172c23 (original) (raw)

Mercurial > cpython

changeset 88249:9a61be172c23

threading.RLock._acquire_restore() now raises a TypeError instead of a SystemError when it is not called with 2 arguments

Victor Stinner victor.stinner@gmail.com
date Thu, 02 Jan 2014 12:47:24 +0100
parents cd952e92c180
children ccb52323039f
files Modules/_threadmodule.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-)[+] [-] Modules/_threadmodule.c 6

line wrap: on

line diff

--- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -379,13 +379,13 @@ current thread, release() needs to be ca to be available for other threads."); static PyObject * -rlock_acquire_restore(rlockobject *self, PyObject *arg) +rlock_acquire_restore(rlockobject *self, PyObject *args) { long owner; unsigned long count; int r = 1;

if (!PyThread_acquire_lock(self->rlock_lock, 0)) { @@ -488,7 +488,7 @@ static PyMethodDef rlock_methods[] = { {"_is_owned", (PyCFunction)rlock_is_owned, METH_NOARGS, rlock_is_owned_doc}, {"_acquire_restore", (PyCFunction)rlock_acquire_restore,