[pypy-svn] r10617 - in pypy/dist/pypy: interpreter translator/genc

tismer at codespeak.net tismer at codespeak.net
Thu Apr 14 15:45:17 CEST 2005


Author: tismer
Date: Thu Apr 14 15:45:17 2005
New Revision: 10617

Modified:
   pypy/dist/pypy/interpreter/gateway.py
   pypy/dist/pypy/translator/genc/pyobjtype.py
Log:
small fix to None docstrings in pyobjtype,
blocked _setup in the applevelinterp class,
still we see some weird objects in targetpypy1
when compiling with -no-a

Modified: pypy/dist/pypy/interpreter/gateway.py
==============================================================================
--- pypy/dist/pypy/interpreter/gateway.py	(original)
+++ pypy/dist/pypy/interpreter/gateway.py	Thu Apr 14 15:45:17 2005
@@ -573,6 +573,7 @@
     _setup_done = False
     
     def _setup(cls):
+        """NOT_RPYTHON"""
         import os
         cls.cache_filename = os.path.join(os.path.dirname(__file__),
                                       "_interplevel_cache.py")

Modified: pypy/dist/pypy/translator/genc/pyobjtype.py
==============================================================================
--- pypy/dist/pypy/translator/genc/pyobjtype.py	(original)
+++ pypy/dist/pypy/translator/genc/pyobjtype.py	Thu Apr 14 15:45:17 2005
@@ -306,8 +306,10 @@
                 if isinstance(value, staticmethod) and value.__get__(1) not in self.translator.flowgraphs and self.translator.frozen:
                     print value
                     continue
-                if isinstance(value, classmethod) and value.__get__(cls).__doc__.lstrip().startswith("NOT_RPYTHON"):
-                    continue
+                if isinstance(value, classmethod):
+                    doc = value.__get__(cls).__doc__
+                    if doc and doc.lstrip().startswith("NOT_RPYTHON"):
+                        continue
                 if isinstance(value, FunctionType) and value not in self.translator.flowgraphs and self.translator.frozen:
                     print value
                     continue



More information about the Pypy-commit mailing list