Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: online-transforms
Changeset: r74234:785c06bae563
Date: 2014-10-25 18:36 +0200
http://bitbucket.org/pypy/pypy/changeset/785c06bae563/

Log:    (arigo, ronan) handle constant unbound methods of frozen as a
        regular function

diff --git a/rpython/annotator/bookkeeper.py b/rpython/annotator/bookkeeper.py
--- a/rpython/annotator/bookkeeper.py
+++ b/rpython/annotator/bookkeeper.py
@@ -327,6 +327,8 @@
                     result = s_self.find_method(x.im_func.__name__)
                 else:
                     # unbound method
+                    if hasattr(x.im_class, '_freeze_'):
+                        return self.immutablevalue(x.im_func)
                     cls_s = self.annotationclass(x.im_class)
                     result = cls_s.find_unboundmethod(x.im_func.__name__)
             else:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to