[pypy-svn] r18799 - in pypy/dist/pypy/translator: . c java pickle

arigo at codespeak.net arigo at codespeak.net
Thu Oct 20 16:49:13 CEST 2005


Author: arigo
Date: Thu Oct 20 16:49:12 2005
New Revision: 18799

Modified:
   pypy/dist/pypy/translator/c/pyobj.py
   pypy/dist/pypy/translator/geninterplevel.py
   pypy/dist/pypy/translator/java/genjava.py
   pypy/dist/pypy/translator/pickle/genpickle.py
Log:
<type 'instancemthod'> of CPython is called <type 'method'> in PyPy.


Modified: pypy/dist/pypy/translator/c/pyobj.py
==============================================================================
--- pypy/dist/pypy/translator/c/pyobj.py	(original)
+++ pypy/dist/pypy/translator/c/pyobj.py	Thu Oct 20 16:49:12 2005
@@ -200,6 +200,8 @@
                 func, ob, typ))
             return name
 
+    nameof_method = nameof_instancemethod   # when run on top of PyPy
+
     def should_translate_attr(self, pbc, attr):
         ann = self.translator.annotator
         if ann is None or isinstance(pbc, ObjSpace):

Modified: pypy/dist/pypy/translator/geninterplevel.py
==============================================================================
--- pypy/dist/pypy/translator/geninterplevel.py	(original)
+++ pypy/dist/pypy/translator/geninterplevel.py	Thu Oct 20 16:49:12 2005
@@ -628,6 +628,8 @@
                 '%s = space.getattr(%s, %s)' % (name, ob, funcname))
             return name
 
+    nameof_method = nameof_instancemethod   # when run on top of PyPy
+
     def should_translate_attr(self, pbc, attr):
         ann = self.translator.annotator
         if ann is None:

Modified: pypy/dist/pypy/translator/java/genjava.py
==============================================================================
--- pypy/dist/pypy/translator/java/genjava.py	(original)
+++ pypy/dist/pypy/translator/java/genjava.py	Thu Oct 20 16:49:12 2005
@@ -214,6 +214,8 @@
                 name, func, ob, typ))
             return name
 
+    nameof_method = nameof_instancemethod   # when run on top of PyPy
+
     def should_translate_attr(self, pbc, attr):
         ann = self.translator.annotator
         if ann is None:

Modified: pypy/dist/pypy/translator/pickle/genpickle.py
==============================================================================
--- pypy/dist/pypy/translator/pickle/genpickle.py	(original)
+++ pypy/dist/pypy/translator/pickle/genpickle.py	Thu Oct 20 16:49:12 2005
@@ -287,6 +287,8 @@
             self.produce('%s = new.instancemethod(%s, %s, %s)' % (
                 name, func, ob, typ))
         return name
+
+    nameof_method = nameof_instancemethod   # when run on top of PyPy
 
     def should_translate_attr(self, pbc, attr):
         ann = self.translator.annotator



More information about the Pypy-commit mailing list