[issue34592] cdll.LoadLibrary allows None as an argument

2021-11-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: We do need to document this in ctypes.rst. Quite a bit of code depends on ctypes.CDLL(None) and similar to get at symbols linked into the interpreter or already dlopened into the process these days. It works on Linux; I'm assuming it likely does on

[issue34592] cdll.LoadLibrary allows None as an argument

2020-02-11 Thread STINNER Victor
STINNER Victor added the comment: In clear, it's a feature, not a bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34592] cdll.LoadLibrary allows None as an argument

2020-02-10 Thread STINNER Victor
STINNER Victor added the comment: I'm using LoadLibrary(None) commonly to load symbols in Python itself ;-) -- nosy: +vstinner ___ Python tracker ___

[issue34592] cdll.LoadLibrary allows None as an argument

2020-02-10 Thread Malcolm Smith
Malcolm Smith added the comment: This isn't documented, but CDLL(None) is translated to dlopen(NULL), which "causes a search for a symbol in the main program, followed by all shared libraries loaded at program startup, and then all shared libraries loaded by dlopen() with the flag

[issue34592] cdll.LoadLibrary allows None as an argument

2018-09-05 Thread Sergei Lebedev
New submission from Sergei Lebedev : LoadLibrary in Python 2.7 through 3.7 accepts None as an argument. I wonder if this has been allowed for a reason? If not, it should probably be changed to raise a TypeError instead. >>> ctypes.cdll.LoadLibrary(None) Interestingly, on Python 2.7