Skip to content

Commit f32e095

Browse files
[3.13] gh-136769: Include fixed-width integers in the fundamental data types table (GH-136784) (#136786)
gh-136769: Include fixed-width integers in the fundamental data types table (GH-136784) Fixed-sized types, like ``c_int32``, are currently missing from the fundamental data types table in the ``ctypes`` documentation. This commit adds them, and notes that ``c_[u]int8`` is an alias of ``c_[u]byte``. (cherry picked from commit acefb97) Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com>
1 parent 96fac51 commit f32e095

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Doc/library/ctypes.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,24 @@ Fundamental data types
232232
+----------------------+------------------------------------------+----------------------------+
233233
| :class:`c_int` | :c:expr:`int` | int |
234234
+----------------------+------------------------------------------+----------------------------+
235+
| :class:`c_int8` | :c:type:`int8_t` | int |
236+
+----------------------+------------------------------------------+----------------------------+
237+
| :class:`c_int16` | :c:type:`int16_t` | int |
238+
+----------------------+------------------------------------------+----------------------------+
239+
| :class:`c_int32` | :c:type:`int32_t` | int |
240+
+----------------------+------------------------------------------+----------------------------+
241+
| :class:`c_int64` | :c:type:`int64_t` | int |
242+
+----------------------+------------------------------------------+----------------------------+
235243
| :class:`c_uint` | :c:expr:`unsigned int` | int |
236244
+----------------------+------------------------------------------+----------------------------+
245+
| :class:`c_uint8` | :c:type:`uint8_t` | int |
246+
+----------------------+------------------------------------------+----------------------------+
247+
| :class:`c_uint16` | :c:type:`uint16_t` | int |
248+
+----------------------+------------------------------------------+----------------------------+
249+
| :class:`c_uint32` | :c:type:`uint32_t` | int |
250+
+----------------------+------------------------------------------+----------------------------+
251+
| :class:`c_uint64` | :c:type:`uint64_t` | int |
252+
+----------------------+------------------------------------------+----------------------------+
237253
| :class:`c_long` | :c:expr:`long` | int |
238254
+----------------------+------------------------------------------+----------------------------+
239255
| :class:`c_ulong` | :c:expr:`unsigned long` | int |
@@ -2348,7 +2364,7 @@ These are the fundamental ctypes data types:
23482364

23492365
.. class:: c_int8
23502366

2351-
Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for
2367+
Represents the C 8-bit :c:expr:`signed int` datatype. It is an alias for
23522368
:class:`c_byte`.
23532369

23542370

@@ -2423,7 +2439,7 @@ These are the fundamental ctypes data types:
24232439

24242440
.. class:: c_uint8
24252441

2426-
Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias for
2442+
Represents the C 8-bit :c:expr:`unsigned int` datatype. It is an alias for
24272443
:class:`c_ubyte`.
24282444

24292445

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy