From d669b6bd0ac449c1d311f83dfed9abc34704db17 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 12 Mar 2016 08:25:22 -0800 Subject: Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt. --- Doc/library/ctypes.rst | 6 ++++++ Misc/NEWS | 2 ++ 2 files changed, 8 insertions(+) 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 diff --git a/Misc/NEWS b/Misc/NEWS index f57aab1..df6ea42 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -284,6 +284,8 @@ Library Documentation ------------- +- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt. + - Issue #25500: Fix documentation to not claim that __import__ is searched for in the global scope. -- cgit v0.12