Author: fijal
Branch: unicode-utf8
Changeset: r90458:ff30e62aa310
Date: 2017-03-01 17:53 +0100
http://bitbucket.org/pypy/pypy/changeset/ff30e62aa310/

Log:    trivial conversion between MethodsPBCRepr

diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py
--- a/rpython/rtyper/rpbc.py
+++ b/rpython/rtyper/rpbc.py
@@ -389,6 +389,12 @@
             return v
         return NotImplemented
 
+class __extend__(pairtype(MethodsPBCRepr, MethodsPBCRepr)):
+    def convert_from_to((r_mpbc1, r_mpbc2), v, llops):
+        if r_mpbc1.lowleveltype == r_mpbc2.lowleveltype:
+            return v
+        return NotImplemented
+
 
 class SmallFunctionSetPBCRepr(FunctionReprBase):
     def __init__(self, rtyper, s_pbc):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to