summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnodeprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-01-24 00:43:26 +0100
committerBenjamin Otte <otte@redhat.com>2020-01-28 02:17:03 +0100
commit146b9212462b8a8ba8eb5c162bc667fe5a792bb0 (patch)
treeb1b9088c9fe8a062da4d3f8b322987a5301e4c87 /gtk/gtkcssnodeprivate.h
parent8b93ea9238bcbb99f6caadca9f6ef1d422926a35 (diff)
downloadgtk+-146b9212462b8a8ba8eb5c162bc667fe5a792bb0.tar.gz
cssnode: Convert name + id from interned string to GQuark
The reason for this is simply that I want to get hash functions that have their values close together, so they can fit in a smaller range (the goal here is 12 bits). By using GQuark, we get consecutive numbers starting with 1 (and applications have <1000 quarks usually), whereas interned strings can be all over the place. As a side effect we also save 64 bytes per declaration.
Diffstat (limited to 'gtk/gtkcssnodeprivate.h')
-rw-r--r--gtk/gtkcssnodeprivate.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index 9f49e09b65..0dab08ab72 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -114,11 +114,11 @@ void gtk_css_node_set_visible (GtkCssNode *
gboolean gtk_css_node_get_visible (GtkCssNode *cssnode) G_GNUC_PURE;
void gtk_css_node_set_name (GtkCssNode *cssnode,
- /*interned*/const char*name);
-/*interned*/const char *gtk_css_node_get_name (GtkCssNode *cssnode) G_GNUC_PURE;
+ GQuark name);
+GQuark gtk_css_node_get_name (GtkCssNode *cssnode) G_GNUC_PURE;
void gtk_css_node_set_id (GtkCssNode *cssnode,
- /*interned*/const char*id);
-/*interned*/const char *gtk_css_node_get_id (GtkCssNode *cssnode) G_GNUC_PURE;
+ GQuark id);
+GQuark gtk_css_node_get_id (GtkCssNode *cssnode) G_GNUC_PURE;
void gtk_css_node_set_state (GtkCssNode *cssnode,
GtkStateFlags state_flags);
GtkStateFlags gtk_css_node_get_state (GtkCssNode *cssnode) G_GNUC_PURE;