summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-03-12 16:25:22 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-03-12 16:25:22 (GMT)
commitd669b6bd0ac449c1d311f83dfed9abc34704db17 (patch)
tree2a4c7f5603a9a694410a268180927ea41c7c401d /Doc
parent126c9c17efedc6f69d5d86de4b660f3b44e635e4 (diff)
downloadcpython-d669b6bd0ac449c1d311f83dfed9abc34704db17.zip
cpython-d669b6bd0ac449c1d311f83dfed9abc34704db17.tar.gz
cpython-d669b6bd0ac449c1d311f83dfed9abc34704db17.tar.bz2
Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/ctypes.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 3b0c956..828d7ca4 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -61,6 +61,12 @@ convention::
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