mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
stringlist: Make one constructor call the other
Simplifies code.
This commit is contained in:
parent
fb14f50ec1
commit
a979daa8ea
@ -145,17 +145,6 @@ gtk_string_object_class_init (GtkStringObjectClass *class)
|
||||
|
||||
}
|
||||
|
||||
static GtkStringObject *
|
||||
gtk_string_object_new (const char *string)
|
||||
{
|
||||
GtkStringObject *result;
|
||||
|
||||
result = g_object_new (GTK_TYPE_STRING_OBJECT, NULL);
|
||||
result->string = g_strdup (string);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static GtkStringObject *
|
||||
gtk_string_object_new_take (char *string)
|
||||
{
|
||||
@ -167,6 +156,12 @@ gtk_string_object_new_take (char *string)
|
||||
return obj;
|
||||
}
|
||||
|
||||
static GtkStringObject *
|
||||
gtk_string_object_new (const char *string)
|
||||
{
|
||||
return gtk_string_object_new_take (g_strdup (string));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_string_object_get_string:
|
||||
* @self: a #GtkStringObject
|
||||
|
Loading…
Reference in New Issue
Block a user