- Treat enums like enums and not values - Avoid invalid free, in case of

2008-03-07  Johan Dahlin  <johan@gnome.org>

    * gtk/gtkbuilder.c:
    * gtk/gtkbuilderparser.c:
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkiconfactory.c:
    * tests/buildertest.c:
    - Treat enums like enums and not values
    - Avoid invalid free, in case of more than two sources
    - Add better error messages
    - Add much improved tests
    (#520979, Christian Persch)


svn path=/trunk/; revision=19732
This commit is contained in:
Johan Dahlin
2008-03-07 20:03:35 +00:00
committed by Johan Dahlin
parent f55db27521
commit 424cc287f1
6 changed files with 196 additions and 34 deletions

View File

@ -50,11 +50,6 @@ static void gtk_builder_get_property (GObject *object,
GParamSpec *pspec);
static GType gtk_builder_real_get_type_from_name (GtkBuilder *builder,
const gchar *type_name);
static gboolean _gtk_builder_enum_from_string (GType type,
const gchar *string,
gint *enum_value,
GError **error);
enum {
PROP_0,
@ -1280,7 +1275,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
return ret;
}
static gboolean
gboolean
_gtk_builder_enum_from_string (GType type,
const gchar *string,
gint *enum_value,