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

mwh at codespeak.net mwh at codespeak.net
Wed Apr 26 11:42:22 CEST 2006


Author: mwh
Date: Wed Apr 26 11:42:21 2006
New Revision: 26354

Modified:
   pypy/dist/pypy/rpython/llinterp.py
Log:
unsafe_call never returns a pointer, always an address.
this is a gross hack, and reflects the gc naive-ness of the stackless
transform at the moment.


Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py	(original)
+++ pypy/dist/pypy/rpython/llinterp.py	Wed Apr 26 11:42:21 2006
@@ -450,7 +450,10 @@
         for arg in obj.graph.startblock.inputargs:
             args.append(arg.concretetype._defl())
         frame = self.__class__(graph, args, self.llinterpreter, self)
-        return frame.eval()
+        result = frame.eval()
+        if isinstance(lltype.typeOf(result), lltype.Ptr):
+            result = llmemory.cast_ptr_to_adr(result)
+        return result
 
     def op_malloc(self, obj):
         if self.llinterpreter.gc is not None:



More information about the Pypy-commit mailing list