From: Cyrus Harmon <ch-sbcl@bo...> - 2005-09-27 03:21:21
I am trying to make an sb-alien interface to some (crappy) old
interfaces, namely some of the core MacOS toolbox. My problem is that
some of the core MacOS routines are defined in the C header file
inside of #pragma align=68k block which causes things to be 16-bit
aligned instead of 32-bit aligned. Obviously, this causes some
problems for trying to work with this code. Clearly there are ways
around and I can think of hacky approaches to getting at the data I
need, but I'm trying to do this in automated fashion using gcc-xml
and automatically generated sb-alien declarations.
The least painful way to do this that I've thought of is to add some
arguments to the sb-alien struct definitions for finer control over
alignment. Can any sbcl developers with some knowledge of sbcl's
alien types offer any suggestions as to whether or not this 1)
feasible, 2) a good idea and 3) there are other approaches that might
be better suited to this problem?