[pypy-svn] r23524 - pypy/dist/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Mon Feb 20 20:54:28 CET 2006


Author: arigo
Date: Mon Feb 20 20:54:27 2006
New Revision: 23524

Modified:
   pypy/dist/pypy/annotation/model.py
Log:
(pedronis, arigo)

support *ForwardReferences in lltype_to_annotation.



Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py	(original)
+++ pypy/dist/pypy/annotation/model.py	Mon Feb 20 20:54:27 2006
@@ -556,7 +556,10 @@
 ll_to_annotation_map = dict([(ll, ann) for ann,ll in annotation_to_ll_map])
 
 def lltype_to_annotation(T):
-    s = ll_to_annotation_map.get(T)
+    try:
+        s = ll_to_annotation_map.get(T)
+    except TypeError:
+        s = None    # unhashable T, e.g. a Ptr(GcForwardReference())
     if s is None:
         if isinstance(T, ootype.Instance):
             return SomeOOInstance(T)



More information about the Pypy-commit mailing list