diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-05-01 03:21:29 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-01 03:21:29 +0000 |
commit | 54e7a94d7005ed8da0707154d3606dec96732ac9 (patch) | |
tree | 9e0e90b2ea8282fa3a23ba548f812c73e3d8979e /gtk/gtkbuilder.c | |
parent | f1919c706f275e457dcf04eaca1cc417a8f34da0 (diff) | |
download | gtk+-54e7a94d7005ed8da0707154d3606dec96732ac9.tar.gz |
builder: Fix signedness issues in apis
Whenever we take a length argument that can
be -1 for 'nul-terminated', it should be
gssize, not gsize.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r-- | gtk/gtkbuilder.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index bac38f2aca..2f5ba245e9 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -1094,7 +1094,7 @@ gtk_builder_add_from_file (GtkBuilder *builder, priv->resource_prefix = NULL; _gtk_builder_parser_parse_buffer (builder, filename, - buffer, length, + buffer, (gssize)length, NULL, &tmp_error); @@ -1160,7 +1160,7 @@ gtk_builder_add_objects_from_file (GtkBuilder *builder, priv->resource_prefix = NULL; _gtk_builder_parser_parse_buffer (builder, filename, - buffer, length, + buffer, (gssize)length, object_ids, &tmp_error); @@ -1198,7 +1198,7 @@ gtk_builder_extend_with_template (GtkBuilder *builder, GtkWidget *widget, GType template_type, const gchar *buffer, - gsize length, + gssize length, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1394,7 +1394,7 @@ gtk_builder_add_objects_from_resource (GtkBuilder *builder, * * Most users will probably want to use gtk_builder_new_from_string(). * - * Upon errors 0 will be returned and @error will be assigned a + * Upon errors %FALSE will be returned and @error will be assigned a * #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or * #G_VARIANT_PARSE_ERROR domain. * @@ -1407,7 +1407,7 @@ gtk_builder_add_objects_from_resource (GtkBuilder *builder, gboolean gtk_builder_add_from_string (GtkBuilder *builder, const gchar *buffer, - gsize length, + gssize length, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1449,7 +1449,7 @@ gtk_builder_add_from_string (GtkBuilder *builder, * building only the requested objects and merges * them with the current contents of @builder. * - * Upon errors 0 will be returned and @error will be assigned a + * Upon errors %FALSE will be returned and @error will be assigned a * #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain. * * If you are adding an object that depends on an object that is not @@ -1461,7 +1461,7 @@ gtk_builder_add_from_string (GtkBuilder *builder, gboolean gtk_builder_add_objects_from_string (GtkBuilder *builder, const gchar *buffer, - gsize length, + gssize length, gchar **object_ids, GError **error) { |