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

Skip to content

Commit d669b6b

Browse files
committed
Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
1 parent 126c9c1 commit d669b6b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Doc/library/ctypes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ convention::
6161

6262
Windows appends the usual ``.dll`` file suffix automatically.
6363

64+
.. note::
65+
Accessing the standard C library through ``cdll.msvcrt`` will use an
66+
outdated version of the library that may be incompatible with the one
67+
being used by Python. Where possible, use native Python functionality,
68+
or else import and use the ``msvcrt`` module.
69+
6470
On Linux, it is required to specify the filename *including* the extension to
6571
load a library, so attribute access can not be used to load libraries. Either the
6672
:meth:`LoadLibrary` method of the dll loaders should be used, or you should load

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ Library
284284
Documentation
285285
-------------
286286

287+
- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
288+
287289
- Issue #25500: Fix documentation to not claim that __import__ is searched for
288290
in the global scope.
289291

0 commit comments

Comments
 (0)