Re: Should I cache LoadLibrary results?

Alexander Belchenko <[email protected]>
Newsgroups gmane.comp.python.ctypes
Message-ID <[email protected]>
Martin (gzlist) пишет:
> On 03/05/2010, Alexander Belchenko <[email protected]> wrote:
>> Question itself: does ctypes do any sort of caching of cdll.LoadLibrary
>> results (for successfully loaded libraries) or should I care about not
>> loading the library several times?
> 
> Using `ctypes.cdll.foo` or `ctypes.cdll['foo']` will cache a
> successful dlopen, but `ctypes.cdll.LoadLibrary('foo')` will not, see
> the LibraryLoader code:
> 
> <http://svn.python.org/view/python/branches/release25-maint/Lib/ctypes/__init__.py?&view=markup#LibraryLoader>

If I understand the code correctly only `ctypes.cdll.foo` is caching one.
Thanks, for the info.

> 
> Martin
> 
> 
> 


-- 
All the dude wanted was his rug back

------------------------------------------------------------------------------
_______________________________________________
ctypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ctypes-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.