Skip to content
Prev Previous commit
Next Next commit
_Bool is a keyword.
  • Loading branch information
serhiy-storchaka committed Jul 22, 2023
commit dc6d2c822c5c2d4cb8735f7cb605bbf219c7ed33
1 change: 0 additions & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
nitpick_ignore = [
# Standard C types
('c:type', 'FILE'),
('c:type', '_Bool'),
('c:type', '__int'),
('c:type', 'intmax_t'),
('c:type', 'off_t'),
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Fundamental data types
+----------------------+------------------------------------------+----------------------------+
| ctypes type | C type | Python type |
+======================+==========================================+============================+
| :class:`c_bool` | :c:type:`_Bool` | bool (1) |
| :class:`c_bool` | :c:texpr:`_Bool` | bool (1) |
+----------------------+------------------------------------------+----------------------------+
| :class:`c_char` | :c:expr:`char` | 1-character bytes object |
+----------------------+------------------------------------------+----------------------------+
Expand Down Expand Up @@ -2421,7 +2421,7 @@ These are the fundamental ctypes data types:

.. class:: c_bool

Represent the C :c:expr:`bool` datatype (more accurately, :c:type:`_Bool` from
Represent the C :c:texpr:`bool` datatype (more accurately, :c:texpr:`_Bool` from
C99). Its value can be ``True`` or ``False``, and the constructor accepts any object
that has a truth value.

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/struct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ platform-dependent.
+--------+--------------------------+--------------------+----------------+------------+
| ``B`` | :c:expr:`unsigned char` | integer | 1 | \(2) |
+--------+--------------------------+--------------------+----------------+------------+
| ``?`` | :c:type:`_Bool` | bool | 1 | \(1) |
| ``?`` | :c:texpr:`_Bool` | bool | 1 | \(1) |
+--------+--------------------------+--------------------+----------------+------------+
| ``h`` | :c:expr:`short` | integer | 2 | \(2) |
+--------+--------------------------+--------------------+----------------+------------+
Expand Down Expand Up @@ -260,7 +260,7 @@ Notes:
(1)
.. index:: single: ? (question mark); in struct format strings

The ``'?'`` conversion code corresponds to the :c:type:`_Bool` type defined by
The ``'?'`` conversion code corresponds to the :c:texpr:`_Bool` type defined by
C99. If this type is not available, it is simulated using a :c:expr:`char`. In
standard mode, it is always represented by one byte.

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,7 @@ changes, or look through the Subversion logs for all the details.
has been updated from version 2.3.2 in Python 2.5 to
version 2.4.1.

* The :mod:`struct` module now supports the C99 :c:type:`_Bool` type,
* The :mod:`struct` module now supports the C99 :c:texpr:`_Bool` type,
using the format character ``'?'``.
(Contributed by David Remahl.)

Expand Down