commit | e4c03e4520cdf0959cb2b0e0cc289cb1e3a0ceb4 | [log] [tgz] |
---|---|---|
author | Thomas Heller <theller@ctypes.org> | Thu Jan 24 18:36:27 2008 +0000 |
committer | Thomas Heller <theller@ctypes.org> | Thu Jan 24 18:36:27 2008 +0000 |
tree | 38d004ce25e234a6c3f738189f90cc69adcb492d | |
parent | eead05fdd629063adafe3edda9f1a9ca249f3173 [diff] |
Use a PyDictObject again for the array type cache; retrieving items from the WeakValueDictionary was slower by nearly a factor of 3. To avoid leaks, weakref proxies for the array types are put into the cache dict, with weakref callbacks that removes the entries when the type goes away.