[pypy-svn] r18390 - pypy/dist/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Tue Oct 11 14:05:14 CEST 2005


Author: arigo
Date: Tue Oct 11 14:05:11 2005
New Revision: 18390

Modified:
   pypy/dist/pypy/translator/c/database.py
   pypy/dist/pypy/translator/c/stackless.py
Log:
removed the hack  Ptr(Opaque("rawmemory")) 
and replaced it with  Address  -- supported by genc since r18342.



Modified: pypy/dist/pypy/translator/c/database.py
==============================================================================
--- pypy/dist/pypy/translator/c/database.py	(original)
+++ pypy/dist/pypy/translator/c/database.py	Tue Oct 11 14:05:11 2005
@@ -89,8 +89,6 @@
                 if who_asks is not None:
                     who_asks.dependencies[node] = True
                 return 'struct %s @' % node.name
-            elif T.tag == 'rawmemory':
-                return 'void @'
             else:
                 raise Exception("don't know about opaque type %r" % (T,))
         else:

Modified: pypy/dist/pypy/translator/c/stackless.py
==============================================================================
--- pypy/dist/pypy/translator/c/stackless.py	(original)
+++ pypy/dist/pypy/translator/c/stackless.py	Tue Oct 11 14:05:11 2005
@@ -7,6 +7,7 @@
 import py
 from pypy.objspace.flow.model import Variable
 from pypy.rpython import lltype
+from pypy.rpython.memory.lladdress import Address
 from pypy.translator.c.funcgen import FunctionCodeGenerator
 
 
@@ -255,12 +256,10 @@
     basic pointer type.
     """
     if isinstance(T, lltype.Ptr):
-        return ERASED_PTR_TYPE
+        return Address
     else:
         return T
 
-ERASED_PTR_TYPE = lltype.Ptr(lltype.OpaqueType("rawmemory"))
-
 
 def simplified_type(T):
     if T is lltype.Void:



More information about the Pypy-commit mailing list