From 023a7ed00e33a6a9e5f3fee742d4c210ce108ecd Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Tue, 21 Jun 2011 13:44:56 +0200 Subject: [PATCH] Rename ALIGN to GI_ALIGN to prevent redefining this macro on some platforms https://bugzilla.gnome.org/show_bug.cgi?id=652625 --- girepository/giroffsets.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c index 7b30809c..2c84b707 100644 --- a/girepository/giroffsets.c +++ b/girepository/giroffsets.c @@ -350,7 +350,7 @@ get_field_size_alignment (GIrTypelibBuild *build, return success; } -#define ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1)) +#define GI_ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1)) static gboolean compute_struct_field_offsets (GIrTypelibBuild *build, @@ -382,7 +382,7 @@ compute_struct_field_offsets (GIrTypelibBuild *build, if (get_field_size_alignment (build, field, node, &member_size, &member_alignment)) { - size = ALIGN (size, member_alignment); + size = GI_ALIGN (size, member_alignment); alignment = MAX (alignment, member_alignment); field->offset = size; size += member_size; @@ -396,14 +396,14 @@ compute_struct_field_offsets (GIrTypelibBuild *build, } else if (member->type == G_IR_NODE_CALLBACK) { - size = ALIGN (size, ffi_type_pointer.alignment); + size = GI_ALIGN (size, ffi_type_pointer.alignment); alignment = MAX (alignment, ffi_type_pointer.alignment); size += ffi_type_pointer.size; } } /* Structs are tail-padded out to a multiple of their alignment */ - size = ALIGN (size, alignment); + size = GI_ALIGN (size, alignment); if (!have_error) { @@ -459,7 +459,7 @@ compute_union_field_offsets (GIrTypelibBuild *build, } /* Unions are tail-padded out to a multiple of their alignment */ - size = ALIGN (size, alignment); + size = GI_ALIGN (size, alignment); if (!have_error) { -- 2.34.1