Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r61750:ee3db3dcb005
Date: 2013-02-25 04:52 -0500
http://bitbucket.org/pypy/pypy/changeset/ee3db3dcb005/

Log:    fix test_exportstruct

diff --git a/rpython/translator/c/test/test_genc.py 
b/rpython/translator/c/test/test_genc.py
--- a/rpython/translator/c/test/test_genc.py
+++ b/rpython/translator/c/test/test_genc.py
@@ -483,12 +483,16 @@
     assert hasattr(ctypes.CDLL(str(t.driver.c_entryp)), 'foobar')
 
 def test_exportstruct():
+    from rpython.translator.tool.cbuild import ExternalCompilationInfo
     from rpython.rlib.exports import export_struct
     def f():
         return 42
     FOO = Struct("FOO", ("field1", Signed))
     foo = malloc(FOO, flavor="raw")
     foo.field1 = 43
+    # maybe export_struct should add the struct name to eci automatically?
+    # https://bugs.pypy.org/issue1361
+    foo._obj._compilation_info = 
ExternalCompilationInfo(export_symbols=['BarStruct'])
     export_struct("BarStruct", foo._obj)
     t = Translation(f, [], backend="c")
     t.annotate()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to