diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-12-10 12:57:10 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2012-12-10 12:57:10 +0100 |
commit | a1ee2b7b82154a506f6dee546975ed97a5fc9e2a (patch) | |
tree | 90a3962d58e8474e092be859d86166c974e68c2c /gtk/gtkcssmatcherprivate.h | |
parent | 089eafb468ac1a49dfd839421346d1ad9b9c3263 (diff) | |
download | gtk+-a1ee2b7b82154a506f6dee546975ed97a5fc9e2a.tar.gz |
css: Speed up name matching
We use the new g_type_get_type_registration_serial() so that we can
cache and properly invalidate the result of g_type_from_name().
This bumps the glib requirement to 2.35.3 to get the new function.
https://bugzilla.gnome.org/show_bug.cgi?id=689847
Diffstat (limited to 'gtk/gtkcssmatcherprivate.h')
-rw-r--r-- | gtk/gtkcssmatcherprivate.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkcssmatcherprivate.h b/gtk/gtkcssmatcherprivate.h index 28810b2ca3..1b2108c387 100644 --- a/gtk/gtkcssmatcherprivate.h +++ b/gtk/gtkcssmatcherprivate.h @@ -36,8 +36,8 @@ struct _GtkCssMatcherClass { const GtkCssMatcher *next); GtkStateFlags (* get_state) (const GtkCssMatcher *matcher); - gboolean (* has_name) (const GtkCssMatcher *matcher, - const char *name); + gboolean (* has_type) (const GtkCssMatcher *matcher, + GType type); gboolean (* has_class) (const GtkCssMatcher *matcher, GQuark class_name); gboolean (* has_id) (const GtkCssMatcher *matcher, @@ -103,10 +103,10 @@ _gtk_css_matcher_get_state (const GtkCssMatcher *matcher) } static inline gboolean -_gtk_css_matcher_has_name (const GtkCssMatcher *matcher, - const char *name) +_gtk_css_matcher_has_type (const GtkCssMatcher *matcher, + GType type) { - return matcher->klass->has_name (matcher, name); + return matcher->klass->has_type (matcher, type); } static inline gboolean |