diff --git a/gsk/gskpathpoint.h b/gsk/gskpathpoint.h index 1881881be5..661a26f48a 100644 --- a/gsk/gskpathpoint.h +++ b/gsk/gskpathpoint.h @@ -57,11 +57,11 @@ void gsk_path_point_free (GskPathPoint *poin GDK_AVAILABLE_IN_4_14 gboolean gsk_path_point_equal (const GskPathPoint *point1, - const GskPathPoint *point2); + const GskPathPoint *point2) G_GNUC_PURE; GDK_AVAILABLE_IN_4_14 int gsk_path_point_compare (const GskPathPoint *point1, - const GskPathPoint *point2); + const GskPathPoint *point2) G_GNUC_PURE; GDK_AVAILABLE_IN_4_14 void gsk_path_point_get_position (const GskPathPoint *point, diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h index 5ab08a9324..939429d614 100644 --- a/gsk/gskrendernodeprivate.h +++ b/gsk/gskrendernodeprivate.h @@ -87,8 +87,8 @@ void gsk_container_node_diff_with (GskRenderNode void gsk_render_node_draw_fallback (GskRenderNode *node, cairo_t *cr); -bool gsk_border_node_get_uniform (const GskRenderNode *self); -bool gsk_border_node_get_uniform_color (const GskRenderNode *self); +bool gsk_border_node_get_uniform (const GskRenderNode *self) G_GNUC_PURE; +bool gsk_border_node_get_uniform_color (const GskRenderNode *self) G_GNUC_PURE; void gsk_text_node_serialize_glyphs (GskRenderNode *self, GString *str); @@ -99,11 +99,11 @@ GskRenderNode ** gsk_container_node_get_children (const GskRenderNode void gsk_transform_node_get_translate (const GskRenderNode *node, float *dx, float *dy); -GdkMemoryDepth gsk_render_node_get_preferred_depth (const GskRenderNode *node); +GdkMemoryDepth gsk_render_node_get_preferred_depth (const GskRenderNode *node) G_GNUC_PURE; -gboolean gsk_container_node_is_disjoint (const GskRenderNode *node); +gboolean gsk_container_node_is_disjoint (const GskRenderNode *node) G_GNUC_PURE; -gboolean gsk_render_node_use_offscreen_for_opacity (const GskRenderNode *node); +gboolean gsk_render_node_use_offscreen_for_opacity (const GskRenderNode *node) G_GNUC_PURE; #define gsk_render_node_ref(node) _gsk_render_node_ref(node) #define gsk_render_node_unref(node) _gsk_render_node_unref(node) diff --git a/gtk/gtkaccessibleprivate.h b/gtk/gtkaccessibleprivate.h index 1e62ff1bc7..b66f0ad2b1 100644 --- a/gtk/gtkaccessibleprivate.h +++ b/gtk/gtkaccessibleprivate.h @@ -87,9 +87,9 @@ typedef enum { GTK_ACCESSIBLE_NAME_NOT_RECOMMENDED, } GtkAccessibleNaming; -gboolean gtk_accessible_role_supports_name_from_author (GtkAccessibleRole role); -gboolean gtk_accessible_role_supports_name_from_content (GtkAccessibleRole role); -GtkAccessibleNaming gtk_accessible_role_get_naming (GtkAccessibleRole role); +gboolean gtk_accessible_role_supports_name_from_author (GtkAccessibleRole role) G_GNUC_CONST; +gboolean gtk_accessible_role_supports_name_from_content (GtkAccessibleRole role) G_GNUC_CONST; +GtkAccessibleNaming gtk_accessible_role_get_naming (GtkAccessibleRole role) G_GNUC_CONST; gboolean gtk_accessible_should_present (GtkAccessible *self); diff --git a/gtk/gtkcolorchooserwidgetprivate.h b/gtk/gtkcolorchooserwidgetprivate.h index 2c59dddcbb..1efb55e173 100644 --- a/gtk/gtkcolorchooserwidgetprivate.h +++ b/gtk/gtkcolorchooserwidgetprivate.h @@ -21,7 +21,7 @@ G_BEGIN_DECLS -char *accessible_color_name (const GdkRGBA *color); +char *accessible_color_name (const GdkRGBA *color) G_GNUC_MALLOC; G_END_DECLS diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c index fcc973e06a..c0b2627157 100644 --- a/gtk/gtkcssarrayvalue.c +++ b/gtk/gtkcssarrayvalue.c @@ -95,7 +95,7 @@ gtk_css_value_array_equal (const GtkCssValue *value1, return TRUE; } -static guint +static inline guint gcd (guint a, guint b) { while (b != 0) @@ -107,7 +107,7 @@ gcd (guint a, guint b) return a; } -static guint +static inline guint lcm (guint a, guint b) { return a / gcd (a, b) * b; diff --git a/gtk/gtkcssproviderprivate.h b/gtk/gtkcssproviderprivate.h index c8891e2f47..97b1aea1c1 100644 --- a/gtk/gtkcssproviderprivate.h +++ b/gtk/gtkcssproviderprivate.h @@ -21,7 +21,7 @@ G_BEGIN_DECLS -char *_gtk_get_theme_dir (void); +char *_gtk_get_theme_dir (void) G_GNUC_MALLOC; const char *_gtk_css_provider_get_theme_dir (GtkCssProvider *provider); diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index 8ecdb9b44b..793e72593f 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -54,11 +54,11 @@ G_BEGIN_DECLS #define gtk_internal_return_val_if_fail(__expr, __val) g_return_val_if_fail(__expr, __val) #endif -const char * _gtk_get_datadir (void); -const char * _gtk_get_libdir (void); -const char * _gtk_get_sysconfdir (void); -const char * _gtk_get_localedir (void); -const char * _gtk_get_data_prefix (void); +const char * _gtk_get_datadir (void) G_GNUC_CONST; +const char * _gtk_get_libdir (void) G_GNUC_CONST; +const char * _gtk_get_sysconfdir (void) G_GNUC_CONST; +const char * _gtk_get_localedir (void) G_GNUC_CONST; +const char * _gtk_get_data_prefix (void) G_GNUC_CONST; gboolean _gtk_fnmatch (const char *pattern, const char *string, @@ -68,7 +68,7 @@ gboolean _gtk_fnmatch (const char *pattern, char * _gtk_make_ci_glob_pattern (const char *pattern); -char * _gtk_get_lc_ctype (void); +char * _gtk_get_lc_ctype (void) G_GNUC_MALLOC; void _gtk_ensure_resources (void); @@ -106,9 +106,9 @@ double _gtk_get_slowdown (void); void _gtk_set_slowdown (double slowdown_factor); char *gtk_get_portal_request_path (GDBusConnection *connection, - char **token); + char **token) G_GNUC_MALLOC; char *gtk_get_portal_session_path (GDBusConnection *connection, - char **token); + char **token) G_GNUC_MALLOC; guint gtk_get_portal_interface_version (GDBusConnection *connection, const char *interface_name);