[clutter] text: Pack all bitfields at the end of the private structure
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] text: Pack all bitfields at the end of the private structure
- Date: Wed, 7 Sep 2011 14:37:46 +0000 (UTC)
commit 9f70ea8dee74ebf5f6f32360b439d9babba58ac3
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Wed Sep 7 15:20:42 2011 +0100
text: Pack all bitfields at the end of the private structure
Don't leave them in the middle, to avoid holes.
clutter/clutter-text.c | 43 ++++++++++++++++++++++---------------------
1 files changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 5380dd8..2afdbf5 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -141,26 +141,6 @@ struct _ClutterTextPrivate
creating a layout */
PangoAttrList *preedit_attrs;
- guint alignment : 2;
- guint wrap : 1;
- guint use_underline : 1;
- guint use_markup : 1;
- guint ellipsize : 3;
- guint single_line_mode : 1;
- guint wrap_mode : 3;
- guint justify : 1;
- guint editable : 1;
- guint cursor_visible : 1;
- guint activatable : 1;
- guint selectable : 1;
- guint selection_color_set : 1;
- guint in_select_drag : 1;
- guint cursor_color_set : 1;
- guint preedit_set : 1;
- guint is_default_font : 1;
- guint has_focus : 1;
- guint selected_text_color_set : 1;
-
/* current cursor position */
gint position;
@@ -196,7 +176,6 @@ struct _ClutterTextPrivate
/* Box representing the paint volume. The box is lazily calculated
and cached */
ClutterPaintVolume paint_volume;
- gboolean paint_volume_valid;
guint preedit_cursor_pos;
gint preedit_n_chars;
@@ -214,6 +193,28 @@ struct _ClutterTextPrivate
/* Signal handler for when the :text-direction changes */
guint direction_changed_id;
+
+ /* bitfields */
+ guint alignment : 2;
+ guint wrap : 1;
+ guint use_underline : 1;
+ guint use_markup : 1;
+ guint ellipsize : 3;
+ guint single_line_mode : 1;
+ guint wrap_mode : 3;
+ guint justify : 1;
+ guint editable : 1;
+ guint cursor_visible : 1;
+ guint activatable : 1;
+ guint selectable : 1;
+ guint selection_color_set : 1;
+ guint in_select_drag : 1;
+ guint cursor_color_set : 1;
+ guint preedit_set : 1;
+ guint is_default_font : 1;
+ guint has_focus : 1;
+ guint selected_text_color_set : 1;
+ guint paint_volume_valid : 1;
};
enum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]