Issue 27329: Document behavior when CDLL is called with None as an argument on POSIX systems (original) (raw)
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.