Skip to content

Commit d727382

Browse files
committed
Address review: describe CDLL on macOS in terms of dlopen, drop NEWS entry
1 parent 01c97fb commit d727382

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎Doc/library/ctypes.rst‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,13 +1584,12 @@ way is to instantiate :py:class:`CDLL` or one of its subclasses:
15841584
they are not added automatically.
15851585
See :ref:`ctypes-finding-shared-libraries` for more information.
15861586

1587-
On macOS, a *name* that is not an absolute path may only be searched
1588-
for in system locations such as :file:`/usr/lib`. Libraries and
1589-
frameworks in folders like :file:`/usr/local/lib`, :file:`~/lib` or
1590-
:file:`~/Library/Frameworks` are then not found, so pass the full path.
1591-
Setting :envvar:`!DYLD_LIBRARY_PATH` or :envvar:`!DYLD_FRAMEWORK_PATH`
1592-
before starting Python adds search locations, but macOS ignores these
1593-
variables for some executables.
1587+
On macOS, :class:`!CDLL` does no searching of its own: *name* is passed
1588+
to :c:func:`!dlopen`, so the search rules and notes in the macOS
1589+
``dlopen`` manual page apply, including any changes in later macOS
1590+
releases. For example, with current builds of Python, including the
1591+
python.org installers, a *name* without a full path is not looked up in
1592+
:file:`/usr/local/lib`; pass the full path instead.
15941593

15951594
On non-Windows systems, *name* can be ``None``. In this case,
15961595
:c:func:`!dlopen` is called with ``NULL``, which opens the main program

‎Misc/NEWS.d/next/Documentation/2026-11-08-16-26-47.gh-issue-88130.JVOGb1.rst‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)