Author: Armin Rigo <[email protected]>
Branch: cpy-extension
Changeset: r313:a964b08b9f82
Date: 2012-06-13 21:45 +0200
http://bitbucket.org/cffi/cffi/changeset/a964b08b9f82/

Log:    Bah, to fix this test it's actually enough to add parentheses around
        the C declaration.

diff --git a/cffi/verifier.py b/cffi/verifier.py
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -265,9 +265,11 @@
                 # accept all integers, but complain on float or double
                 prnt('  (p->%s) << 1;' % fname)
             else:
-                # only accept exactly the type declared
+                # only accept exactly the type declared.  Note the parentheses
+                # around the '*tmp' below.  In most cases they are not needed
+                # but don't hurt --- except test_struct_array_field.
                 prnt('  { %s = &p->%s; }' % (
-                    ftype.get_c_name(' *tmp'), fname))
+                    ftype.get_c_name('(*tmp)'), fname))
         prnt('}')
         prnt()
 
diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -212,7 +212,6 @@
             _check_field_match(typename, real, expect_mismatch=True)
 
 def test_struct_array_field():
-    py.test.skip("in-progress")
     ffi = FFI()
     ffi.cdef("struct foo_s { int a[17]; ...; };")
     ffi.verify("struct foo_s { int x; int a[17]; int y; };")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to