mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
Merge branch 'wip/chergert/gvariant-padding' into 'main'
gvariant: Add portable alignment fix for GVariant suffix Closes #3486 See merge request GNOME/glib!4320
This commit is contained in:
commit
a083ae415b
@ -76,13 +76,12 @@ struct _GVariant
|
||||
gatomicrefcount ref_count;
|
||||
gsize depth;
|
||||
|
||||
#if g_macro__has_attribute(aligned)
|
||||
guint8 suffix[] __attribute__((aligned(8)));
|
||||
#elif defined _MSC_VER
|
||||
__declspec(align (8)) guint8 suffix[];
|
||||
#else
|
||||
guint8 suffix[];
|
||||
#if GLIB_SIZEOF_VOID_P == 4
|
||||
/* Keep suffix aligned to 8 bytes */
|
||||
guint _padding;
|
||||
#endif
|
||||
|
||||
guint8 suffix[];
|
||||
};
|
||||
|
||||
/* Ensure our suffix data aligns to largest guaranteed offset
|
||||
|
Loading…
Reference in New Issue
Block a user