[Python-checkins] cpython (merge 3.5 -> default): Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.

steve.dower python-checkins at python.org
Sat Mar 12 11:26:48 EST 2016


https://hg.python.org/cpython/rev/6d84fe4d8cb0
changeset:   100505:6d84fe4d8cb0
parent:      100503:fabbfad67362
parent:      100504:f9dc71b566fb
user:        Steve Dower <steve.dower at microsoft.com>
date:        Sat Mar 12 08:26:29 2016 -0800
summary:
  Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.

files:
  Doc/library/ctypes.rst |  6 ++++++
  Misc/NEWS              |  2 ++
  2 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -61,6 +61,12 @@
 
 Windows appends the usual ``.dll`` file suffix automatically.
 
+.. note::
+    Accessing the standard C library through ``cdll.msvcrt`` will use an
+    outdated version of the library that may be incompatible with the one
+    being used by Python. Where possible, use native Python functionality,
+    or else import and use the ``msvcrt`` module.
+
 On Linux, it is required to specify the filename *including* the extension to
 load a library, so attribute access can not be used to load libraries. Either the
 :meth:`LoadLibrary` method of the dll loaders should be used, or you should load
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -772,6 +772,8 @@
 Documentation
 -------------
 
+- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
+
 - Issue #24952: Clarify the default size argument of stack_size() in
   the "threading" and "_thread" modules. Patch from Mattip.
 

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


More information about the Python-checkins mailing list