@@ -68,17 +68,17 @@ lock_PyThread_acquire_lock(lockobject *self, PyObject *args)
6868 return Py_None ;
6969 }
7070 else
71- return PyInt_FromLong ((long )i );
71+ return PyBool_FromLong ((long )i );
7272}
7373
7474static char acquire_doc [] =
75- "acquire([wait]) -> None or Boolean \n\
75+ "acquire([wait]) -> None or bool \n\
7676(PyThread_acquire_lock() is an obsolete synonym)\n\
7777\n\
7878Lock the lock. Without argument, this blocks if the lock is already\n\
7979locked (even by the same thread), waiting for another thread to release\n\
80- the lock, and return None when the lock is acquired.\n\
81- With a Boolean argument, this will only block if the argument is true,\n\
80+ the lock, and return None once the lock is acquired.\n\
81+ With an argument, this will only block if the argument is true,\n\
8282and the return value reflects whether the lock is acquired.\n\
8383The blocking operation is not interruptible." ;
8484
@@ -110,13 +110,13 @@ lock_locked_lock(lockobject *self)
110110{
111111 if (PyThread_acquire_lock (self -> lock_lock , 0 )) {
112112 PyThread_release_lock (self -> lock_lock );
113- return PyInt_FromLong (0L );
113+ return PyBool_FromLong (0L );
114114 }
115- return PyInt_FromLong (1L );
115+ return PyBool_FromLong (1L );
116116}
117117
118118static char locked_doc [] =
119- "locked() -> Boolean \n\
119+ "locked() -> bool \n\
120120(locked_lock() is an obsolete synonym)\n\
121121\n\
122122Return whether the lock is in the locked state." ;
0 commit comments