This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document behavior when CDLL is called with None as an argument on POSIX systems
Type: enhancement Stage: needs patch
Components: ctypes, Documentation Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jeffrey Esquivel Sibaja, docs@python
Priority: normal Keywords:

Created on 2016-06-16 04:38 by Jeffrey Esquivel Sibaja, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg268641 - (view) Author: Jeffrey Esquivel Sibaja (Jeffrey Esquivel Sibaja) Date: 2016-06-16 04:38
On POSIX systems, when CDLL is called with None as an argument, it will call the system's dlopen() library function with NULL as it's filename parameter, causing the following behavior (as documented on dlopen's manpage):

"If filename is NULL, then the returned handle is for the main  program.  When given to dlsym(), this handle causes a search for a symbol in the main program, followed by all shared objects loaded at program startup, and then all shared objects loaded by dlopen() with the flag RTLD_GLOBAL."

But right now, this behavior is not explicitly documented anywhere which means users need to read ctypes' source code to find out if this would work.
History
Date User Action Args
2022-04-11 14:58:32adminsetgithub: 71516
2016-06-16 04:48:22martin.pantersetstage: needs patch
2016-06-16 04:38:10Jeffrey Esquivel Sibajacreate