Ivan Pozdeev added the comment: > If you want cached libs without polluting ctypes.cdll or ctypes.windll, just > create your own instance such as windll = ctypes.LibraryLoader(ctypes.WinDLL).
This one looks like the next best thing to the current state of affairs, requiring minimal change to existing code. `cast' appears to be the "right way" when saving individual _FuncPtr's in a local namespace but it's far from being obvious. If going this way, a prominent warning in https://docs.python.org/2.7/library/ctypes.html?highlight=ctypes#loading-dynamic-link-libraries with the way to go would probably suffice. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22552> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com