diff options
author | Thorsten Glaser <tg@debian.org> | 2012-02-08 09:02:37 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-02-08 09:07:13 -0500 |
commit | 9e56835f5ebb601aa0cb22130555a8a4ef15b11b (patch) | |
tree | 1b5ba201da6fd9e430b7e43e0726533c7c91d92b /girepository | |
parent | 40793887a33f20f82331f8940ea0ab4419f373fa (diff) | |
download | gobject-introspection-9e56835f5ebb601aa0cb22130555a8a4ef15b11b.tar.gz |
typelib: Fix invalid alignment assumptions
The current source has invalid assumptions about structure alignment
that break on platforms like m68k where 32-bit integers are aligned to
16-bit only. Fix this by introducing explicit structure padding for
32-bit quantities following odd numbers of 16-bit quantities and
structure trail padding, to make the binary representation generated
by the compiler match the text of the specification exactly.
https://bugzilla.gnome.org/show_bug.cgi?id=661839
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/gitypelib-internal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/girepository/gitypelib-internal.h b/girepository/gitypelib-internal.h index 08fb8500..ed8e6792 100644 --- a/girepository/gitypelib-internal.h +++ b/girepository/gitypelib-internal.h @@ -282,7 +282,7 @@ typedef struct { guint32 sections; /* <private> */ - guint16 padding[5]; + guint16 padding[6]; } Header; typedef enum { @@ -434,6 +434,10 @@ typedef struct { gint8 closure; gint8 destroy; + /* <private> */ + guint16 padding; + /* <public> */ + SimpleTypeBlob arg_type; } ArgBlob; @@ -1051,6 +1055,8 @@ typedef struct { guint16 n_vfuncs; guint16 n_constants; + guint16 padding; + guint32 reserved2; guint32 reserved3; |