Skip to content

Commit 36c8ebc

Browse files
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent f50cbbb commit 36c8ebc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Doc/c-api/init.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,14 +2572,14 @@ These APIs are obsolete since Python 3.13 with the introduction of
25722572
25732573
.. c:enumerator:: PY_LOCK_INTR
25742574
2575-
The lock was interrupted by an interrupt signal.
2575+
The lock was interrupted by a signal.
25762576
25772577
25782578
.. c:function:: PyThread_type_lock PyThread_allocate_lock(void)
25792579
25802580
Allocate a new lock.
25812581
2582-
On success, this function returns a non-zero lock; on failure, this
2582+
On success, this function returns a lock; on failure, this
25832583
function returns ``0`` without an exception set.
25842584
25852585
The caller does not need to hold an :term:`attached thread state`.
@@ -2625,10 +2625,10 @@ These APIs are obsolete since Python 3.13 with the introduction of
26252625
26262626
If *waitflag* is ``0`` and another thread holds the lock, this function will
26272627
not wait and instead return ``0``. If the lock is not held by any other
2628-
thread, then this function will quickly acquire it and return ``1``.
2628+
thread, then this function will acquire it and return ``1``.
26292629
26302630
Unlike :c:func:`PyThread_acquire_lock_timed`, acquiring the lock cannot be
2631-
interrupted by CTRL^C.
2631+
interrupted by a signal.
26322632
26332633
The caller does not need to hold an :term:`attached thread state`.
26342634
@@ -2648,7 +2648,7 @@ Operating System Thread APIs
26482648
26492649
Sentinel value for an invalid thread ID.
26502650
2651-
This is currently equivalent to ``-1``.
2651+
This is currently equivalent to ``(unsigned long)-1``.
26522652
26532653
26542654
.. c:function:: unsigned long PyThread_start_new_thread(void (*func)(void *), void *arg)
@@ -2658,7 +2658,7 @@ Operating System Thread APIs
26582658
26592659
*func* must not be ``NULL``, but *arg* may be ``NULL``.
26602660
2661-
On success, this function returns the ID of the new thread; on failure,
2661+
On success, this function returns the identifier of the new thread; on failure,
26622662
this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`.
26632663
26642664
The caller does not need to hold an :term:`attached thread state`.
@@ -2689,12 +2689,12 @@ Operating System Thread APIs
26892689
26902690
.. c:macro:: PY_HAVE_THREAD_NATIVE_ID
26912691
2692-
This is defined when the system supports native thread IDs.
2692+
This macro is defined when the system supports native thread IDs.
26932693
26942694
26952695
.. c:function:: unsigned long PyThread_get_thread_native_id(void)
26962696
2697-
Get the native ID of the current thread as it was assigned by the operating
2697+
Get the native identifier of the current thread as it was assigned by the operating
26982698
system's kernel, which will never be less than zero.
26992699
27002700
This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is
@@ -2723,7 +2723,7 @@ Operating System Thread APIs
27232723
``noexcept`` function is reached, it may terminate the process.
27242724
Other systems, such as macOS, do unwinding.
27252725
2726-
On Windows, this function calls ``_endthreadex``, which kills the thread
2726+
On Windows, this function calls ``_endthreadex()``, which kills the thread
27272727
without calling C++ destructors.
27282728
27292729
In any case, there is a risk of corruption on the thread's stack.
@@ -2739,7 +2739,7 @@ Operating System Thread APIs
27392739
27402740
.. c:function:: int PyThread_set_stacksize(size_t size)
27412741
2742-
Set the stack size of the current thread to *size*.
2742+
Set the stack size of the current thread to *size* bytes.
27432743
27442744
This function returns ``0`` on success, ``-1`` if *size* is invalid, or
27452745
``-2`` if the system does not support changing the stack size. This function
@@ -2750,7 +2750,7 @@ Operating System Thread APIs
27502750
27512751
.. c:function:: size_t PyThread_get_stacksize(void)
27522752
2753-
Return the stack size of the current thread, or ``0`` if the system's
2753+
Return the stack size of the current thread in bytes, or ``0`` if the system's
27542754
default stack size is in use.
27552755
27562756
The caller does not need to hold an :term:`attached thread state`.

0 commit comments

Comments
 (0)