Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d85a1e6

Browse files
committed
Issue #16192: Clarify when c_int is an alias to c_long in ctypes documentation
1 parent a49ccf2 commit d85a1e6

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Doc/library/ctypes.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ Note: The code samples in this tutorial use :mod:`doctest` to make sure that
2020
they actually work. Since some code samples behave differently under Linux,
2121
Windows, or Mac OS X, they contain doctest directives in comments.
2222

23-
Note: Some code samples reference the ctypes :class:`c_int` type. This type is
24-
an alias for the :class:`c_long` type on 32-bit systems. So, you should not be
25-
confused if :class:`c_long` is printed if you would expect :class:`c_int` ---
26-
they are actually the same type.
27-
23+
Note: Some code samples reference the ctypes :class:`c_int` type. On platforms
24+
where ``sizeof(long double) == sizeof(double)`` it is an alias to
25+
:class:`c_double`. So, you should not be confused if :class:`c_long` is
26+
printed if you would expect :class:`c_int` --- they are actually the same type.
2827

2928
.. _ctypes-loading-dynamic-link-libraries:
3029

0 commit comments

Comments
 (0)