FFI: Return the right alignment for structures.
authorLudovic Courtès <ludo@gnu.org>
Thu, 10 Mar 2011 21:24:23 +0000 (22:24 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 10 Mar 2011 21:24:23 +0000 (22:24 +0100)
commitd82f8518b96bbfa4f29e03d922369c37b64824d9
tree76ba1ae0261a79fe3daa309f1c24f7846b6748f3
parentdd36ce77cd899c7b179026603e751e3bb47b2943
FFI: Return the right alignment for structures.

* libguile/foreign.c (scm_alignof): Fix handling of structure alignment.
  Reported by Aidan Gauland <aidalgol@no8wireless.co.nz>.

* test-suite/tests/foreign.test ("structs")["alignof { int8, double,
  int8 }", "int8, { int8, double, int8 }, int16"]: New tests.
libguile/foreign.c
test-suite/tests/foreign.test