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

pedronis at codespeak.net pedronis at codespeak.net
Mon Jun 13 15:18:44 CEST 2005


Author: pedronis
Date: Mon Jun 13 15:18:39 2005
New Revision: 13346

Modified:
   pypy/dist/pypy/translator/c/funcgen.py
Log:
genc support for cast_pointer (identical to the old cast_parent at this level)



Modified: pypy/dist/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/dist/pypy/translator/c/funcgen.py	(original)
+++ pypy/dist/pypy/translator/c/funcgen.py	Mon Jun 13 15:18:39 2005
@@ -445,6 +445,13 @@
                                  cdecl(typename, ''),
                                  self.expr(op.args[0]))
 
+    def OP_CAST_POINTER(self, op, err):
+        TYPE = self.lltypemap[op.result]
+        typename = self.db.gettype(TYPE)
+        return '%s = (%s)%s;' % (self.expr(op.result),
+                                 cdecl(typename, ''),
+                                 self.expr(op.args[0]))    
+
     def OP_SAME_AS(self, op, err):
         result = []
         assert self.lltypemap[op.args[0]] == self.lltypemap[op.result]



More information about the Pypy-commit mailing list