[pypy-svn] r22633 - pypy/dist/pypy/translator/llvm

rxe at codespeak.net rxe at codespeak.net
Wed Jan 25 11:23:26 CET 2006


Author: rxe
Date: Wed Jan 25 11:23:25 2006
New Revision: 22633

Modified:
   pypy/dist/pypy/translator/llvm/extfuncnode.py
Log:
To run tests on 32 bit machines again.


Modified: pypy/dist/pypy/translator/llvm/extfuncnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/extfuncnode.py	(original)
+++ pypy/dist/pypy/translator/llvm/extfuncnode.py	Wed Jan 25 11:23:25 2006
@@ -4,6 +4,8 @@
 
 log = log.extfuncnode
 
+from sys import maxint
+
 class ExtFuncSig(object):
     def __init__(self, rettype, args):
         self.rettype = rettype
@@ -14,11 +16,13 @@
     "%LL_os_isatty" : ExtFuncSig("int", None),
     "%LL_stack_too_big" : ExtFuncSig("int", None),
     "%LL_os_lseek" : ExtFuncSig("int", None),
-    "%LL_os_write" : ExtFuncSig(None, ["int", None]),
     "%LL_thread_acquirelock" : ExtFuncSig("int", [None, "int"]),
     "%LL_thread_start" : ExtFuncSig(None, ["sbyte*", "sbyte*"]),
     }
 
+if maxint != 2**31-1:
+    ext_func_sigs["%LL_os_write"] = ExtFuncSig(None, ["int", None])
+
 class ExternalFuncNode(ConstantLLVMNode):
 
     def __init__(self, db, value):
@@ -40,7 +44,6 @@
     def _get_wrapper(self):
         wrapper = ext_func_sigs.get(self.ref, None)
 
-        from sys import maxint
         if wrapper is None and maxint != 2**31-1:
             #log("ref=%s" % self.ref)
             rettype, args = self.getdecl_parts()



More information about the Pypy-commit mailing list