[gobject-introspection] Rename ALIGN to GI_ALIGN to prevent redefining this macro on some platforms
- From: Jasper Lievisse Adriaanse <jasperla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Rename ALIGN to GI_ALIGN to prevent redefining this macro on some platforms
- Date: Tue, 21 Jun 2011 13:09:56 +0000 (UTC)
commit 023a7ed00e33a6a9e5f3fee742d4c210ce108ecd
Author: Jasper Lievisse Adriaanse <jasper humppa nl>
Date: Tue Jun 21 13:44:56 2011 +0200
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 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
index 7b30809..2c84b70 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]