Add missing g_return_val_if_fail checks for public API.

2008-02-29  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkbuilder.c:
	Add missing g_return_val_if_fail checks for public API.


svn path=/trunk/; revision=19684
This commit is contained in:
Johan Dahlin 2008-03-01 16:47:34 +00:00 committed by Johan Dahlin
parent a57b66aac2
commit bee4a9fcc3
2 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,8 @@
2008-02-29 Johan Dahlin <johan@gnome.org>
* gtk/gtkbuilder.c:
Add missing g_return_val_if_fail checks for public API.
* gtk/gtkbuilderparser.c:
* gtk/gtkbuilderprivate.h:
Do not use g_error for a few more errors, instead set

View File

@ -663,6 +663,7 @@ gtk_builder_add_from_file (GtkBuilder *builder,
g_return_val_if_fail (GTK_IS_BUILDER (builder), 0);
g_return_val_if_fail (filename != NULL, 0);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
tmp_error = NULL;
@ -714,6 +715,7 @@ gtk_builder_add_from_string (GtkBuilder *builder,
g_return_val_if_fail (GTK_IS_BUILDER (builder), 0);
g_return_val_if_fail (buffer != NULL, 0);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
tmp_error = NULL;
@ -1015,6 +1017,12 @@ gtk_builder_value_from_string (GtkBuilder *builder,
GValue *value,
GError **error)
{
g_return_val_if_fail (GTK_IS_BUILDER (builder), FALSE);
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);
g_return_val_if_fail (string != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
/*
* GParamSpecUnichar has the internal type G_TYPE_UINT,
* so we cannot handle this in the switch, do it separately
@ -1062,6 +1070,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
g_return_val_if_fail (type != G_TYPE_INVALID, FALSE);
g_return_val_if_fail (string != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_value_init (value, type);