[pypy-svn] r49429 - pypy/dist/pypy/rpython/lltypesystem/test

rxe at codespeak.net rxe at codespeak.net
Thu Dec 6 00:19:44 CET 2007


Author: rxe
Date: Thu Dec  6 00:19:44 2007
New Revision: 49429

Modified:
   pypy/dist/pypy/rpython/lltypesystem/test/test_rffi.py
Log:
fix the test to be more opaque like

Modified: pypy/dist/pypy/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/test/test_rffi.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/test/test_rffi.py	Thu Dec  6 00:19:44 2007
@@ -219,13 +219,19 @@
         struct stuff {
            char data[38];
         };
-    
+        """)
+        
+        c_source = py.code.Source("""
+        #include "opaque.h"
+                                  
         char get(struct stuff* x)
         {
            x->data[13] = 'a';
            return x->data[13];
         }
         """)
+        
+
         # if it doesn't segfault, than we probably malloced it :-)
         h_file = udir.join("opaque.h")
         h_file.write(h_source)
@@ -233,7 +239,8 @@
         from pypy.rpython.tool import rffi_platform
         eci = ExternalCompilationInfo(
             includes=['opaque.h'],
-            include_dirs=[str(udir)]
+            include_dirs=[str(udir)],
+            separate_module_sources=[c_source]
         )
         STUFFP = COpaquePtr('struct stuff', compilation_info=eci)
     
@@ -534,6 +541,3 @@
 
     def test_hashdefine(self):
         py.test.skip("Macros cannot be called as llexternals by design, rffi does not have any special support for them")
-
-    def test_opaque_type(self):
-        py.test.skip("GenLLVM handles opaque type defs incorrectly")



More information about the Pypy-commit mailing list