[pypy-svn] r32298 - pypy/dist/pypy/rpython

fijal at codespeak.net fijal at codespeak.net
Thu Sep 14 11:36:46 CEST 2006


Author: fijal
Date: Thu Sep 14 11:36:44 2006
New Revision: 32298

Modified:
   pypy/dist/pypy/rpython/rexternalobj.py
Log:
Added ll_str method for BasicExternal


Modified: pypy/dist/pypy/rpython/rexternalobj.py
==============================================================================
--- pypy/dist/pypy/rpython/rexternalobj.py	(original)
+++ pypy/dist/pypy/rpython/rexternalobj.py	Thu Sep 14 11:36:44 2006
@@ -32,6 +32,7 @@
     def __init__(self, knowntype):
         self.knowntype = knowntype
         self.lowleveltype = knowntype
+        self.name = "<class '%s'>" % self.knowntype._class_.__name__
     
     def convert_const(self, value):
         from pypy.rpython.ootypesystem.bltregistry import ExternalType,_external_type
@@ -66,7 +67,9 @@
     def rtype_is_true(self, hop):
         vlist = hop.inputargs(self)
         return hop.genop('is_true', vlist, resulttype=lltype.Bool)
-
+    
+    def ll_str(self, val):
+        return ootype.oostring(self.name, -1)
     
     def __getattr__(self, attr):
         if attr.startswith("rtype_method_"):



More information about the Pypy-commit mailing list