[pypy-svn] r62851 - pypy/trunk/pypy/rpython/lltypesystem
arigo at codespeak.net
arigo at codespeak.net
Wed Mar 11 12:31:52 CET 2009
Author: arigo
Date: Wed Mar 11 12:31:52 2009
New Revision: 62851
Modified:
pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
Another fix for test_ll2ctypes. I don't know in which direction
this change was done before, so this is either redoing a lost change,
or cancelling an invalid fix.
Modified: pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py (original)
+++ pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py Wed Mar 11 12:31:52 2009
@@ -627,12 +627,9 @@
c_tp = get_ctypes_type(T.TO)
storage._normalized_ctype = c_tp
if normalize and getattr(T.TO, '_arrayfld', None):
- try:
- c_tp = _ctypes_cache[T.TO]
- except KeyError:
- c_tp = build_ctypes_struct(T.TO, [],
- len(getattr(storage, T.TO._arrayfld).items))
- _ctypes_cache[T.TO] = c_tp
+ # XXX doesn't cache
+ c_tp = build_ctypes_struct(T.TO, [],
+ len(getattr(storage, T.TO._arrayfld).items))
p = ctypes.cast(p, ctypes.POINTER(c_tp))
elif normalize and hasattr(storage, '_normalized_ctype'):
p = ctypes.cast(p, ctypes.POINTER(storage._normalized_ctype))
More information about the Pypy-commit
mailing list