[pypy-svn] r48906 - in pypy/dist/pypy/translator/llvm: . test

rxe at codespeak.net rxe at codespeak.net
Wed Nov 21 16:04:27 CET 2007


Author: rxe
Date: Wed Nov 21 16:04:26 2007
New Revision: 48906

Modified:
   pypy/dist/pypy/translator/llvm/externs2ll.py
   pypy/dist/pypy/translator/llvm/test/runtest.py
Log:
(fijal, antocuni, rxe)  remove monkey patching hack

Modified: pypy/dist/pypy/translator/llvm/externs2ll.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/externs2ll.py	(original)
+++ pypy/dist/pypy/translator/llvm/externs2ll.py	Wed Nov 21 16:04:26 2007
@@ -221,8 +221,7 @@
         
     for c_source in c_sources:
         ccode.append('\n')
-        for l in c_source:
-            ccode.append(l + '\n') 
+        ccode.append(c_source + '\n') 
     ccode.append('\n')
 
     # append our source file

Modified: pypy/dist/pypy/translator/llvm/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/llvm/test/runtest.py	Wed Nov 21 16:04:26 2007
@@ -39,33 +39,8 @@
         del _ext_modules[:-leave]
     else:
         del _ext_modules[:]
-            
-def setup_module(mod):
-    from pypy.rpython.lltypesystem import lltype
-    from pypy.rpython.lltypesystem.rffi import llexternal
-
-    c_source = py.code.Source("""
-    int get_errno() {
-        return errno;
-    }
-    """)
-    get_errno = llexternal('get_errno', [], lltype.Signed, sources=[c_source])
-
-    c_source = py.code.Source("""
-    void set_errno(int _errno) {
-        errno = _errno;
-    }
-    """)
-    set_errno = llexternal('set_errno', [lltype.Signed], lltype.Void, sources=[c_source])
-    global _get_errno, _set_errno
-    import pypy.rpython.lltypesystem.rffi
-    pypy.rpython.lltypesystem.rffi.get_errno, _get_errno = get_errno, pypy.rpython.lltypesystem.rffi.get_errno
-    pypy.rpython.lltypesystem.rffi.set_errno, _set_errno= set_errno, pypy.rpython.lltypesystem.rffi.set_errno
 
 def teardown_module(mod):
-    import pypy.rpython.lltypesystem.rffi
-    pypy.rpython.lltypesystem.rffi.get_errno = _get_errno
-    pypy.rpython.lltypesystem.rffi.set_errno = _set_errno
     _cleanup()
     
 def llvm_test():



More information about the Pypy-commit mailing list