Skip to content

PEP 539: Fix wording about Py_tss_NEEDS_INIT #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pep-0539.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ The specification also adds a few new features:
where ``NATIVE_TSS_KEY_T`` is a macro whose value depends on the
underlying native TLS implementation (e.g. ``pthread_key_t``).

* A constant default value for ``Py_tss_t`` variables,
``Py_tss_NEEDS_INIT``.
* An initializer for ``Py_tss_t`` variables, ``Py_tss_NEEDS_INIT``.

* Three new functions::

Expand Down Expand Up @@ -157,7 +156,7 @@ Features - create key - create key
key
- check key's initialization
state
Default Value (``-1`` as key creation ``Py_tss_NEEDS_INIT``
Key Initializer (``-1`` as key creation ``Py_tss_NEEDS_INIT``
failure)
Requirement native threads native threads
(since CPython 3.7 [9]_)
Expand Down Expand Up @@ -287,7 +286,7 @@ part of the C11 threads API [15]_. However, this is in no way meant to imply
compatibility with or support for the C11 threads API, or signal any future
intention of supporting C11--it's just the influence for the naming and design.

The inclusion of the special default value ``Py_tss_NEEDS_INIT`` is required
The inclusion of the special initializer ``Py_tss_NEEDS_INIT`` is required
by the fact that not all native TLS implementations define a sentinel value
for uninitialized TLS keys. For example, on Windows a TLS key is
represented by a ``DWORD`` (``unsigned int``) and its value must be treated
Expand Down