[Python-checkins] cpython (3.5): Issue #16192: Clarify when c_int is an alias to c_long in ctypes documentation

berker.peksag python-checkins at python.org
Thu Jun 2 15:08:02 EDT 2016


https://hg.python.org/cpython/rev/1775abf47061
changeset:   101605:1775abf47061
branch:      3.5
parent:      101602:7c67cb3b54b4
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Thu Jun 02 12:17:51 2016 -0700
summary:
  Issue #16192: Clarify when c_int is an alias to c_long in ctypes documentation

files:
  Doc/library/ctypes.rst |  9 ++++-----
  1 files changed, 4 insertions(+), 5 deletions(-)


diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -20,11 +20,10 @@
 they actually work.  Since some code samples behave differently under Linux,
 Windows, or Mac OS X, they contain doctest directives in comments.
 
-Note: Some code samples reference the ctypes :class:`c_int` type. This type is
-an alias for the :class:`c_long` type on 32-bit systems.  So, you should not be
-confused if :class:`c_long` is printed if you would expect :class:`c_int` ---
-they are actually the same type.
-
+Note: Some code samples reference the ctypes :class:`c_int` type.  On platforms
+where ``sizeof(long double) == sizeof(double)`` it is an alias to
+:class:`c_double`.  So, you should not be confused if :class:`c_long` is
+printed if you would expect :class:`c_int` --- they are actually the same type.
 
 .. _ctypes-loading-dynamic-link-libraries:
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list