diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-20 06:38:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-20 06:38:44 -0700 |
commit | 48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f (patch) | |
tree | 678a01888e57184e4419d18ca2995bf2bf5972f5 /ffi.c | |
parent | 1c70056c20ad0001b45daa7289c01d0eb3577211 (diff) | |
download | txr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.tar.gz txr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.tar.bz2 txr-48b4ba967a3c04c7dd263e775e0cbbb03ed58e8f.zip |
ffi: behavior of align subject to compat.
* ffi.c (ffi_type_compile): Allow align to weaken (lower) alignment
if compatibility 275 or lower is requested.
* txr.1: Compat note added.
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4358,7 +4358,8 @@ val ffi_type_compile(val syntax) } else { val altype_copy = ffi_type_copy(altype); struct txr_ffi_type *atft = ffi_type_struct(altype_copy); - if (al > atft->align || sym == pack_s) + if (al > atft->align || sym == pack_s || + (opt_compat && opt_compat <= 275)) atft->align = al; return altype_copy; } |