mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
removed archaic gpointer derived_data; relict and added a GData member
Wed Mar 14 18:46:54 2001 Tim Janik <timj@gtk.org> * gscanner.[hc]: removed archaic gpointer derived_data; relict and added a GData member instead. * glist.[hc]: added g_list_remove_all(). * gslist.[hc]: added g_slist_remove_all(). Sat Mar 17 23:18:36 2001 Tim Janik <timj@gtk.org> * gobject.c (g_object_get_property): minor bug-fix. * gbsearcharray.[hc]: provide a macro for static initialization and functions g_bsearch_array_new() and g_bsearch_array_destroy() for dynamic allocations. * gboxed.c: introduce G_TYPE_GSTRING, boxed type for GString. * gclosure.[hc]: naming corrections. Fri Mar 9 16:42:08 2001 Tim Janik <timj@gtk.org> * gvaluetypes.[hc]: moved g_strdup_value_contents() into this file as a public function (was static in gobject.c before). it's a bit odd to have that function here, especially since it requires extra includes, but then it doesn't very well fit somewhere else either. * gparamspecs.c: added default/max/min checks to param spec creation functions.
This commit is contained in:
@@ -462,7 +462,7 @@ g_value_types_init (void) /* sync with gtype.c */
|
||||
value_lcopy_string, /* lcopy_value */
|
||||
};
|
||||
info.value_table = &value_table;
|
||||
type = g_type_register_fundamental (G_TYPE_STRING, "gstring", &info, &finfo, 0);
|
||||
type = g_type_register_fundamental (G_TYPE_STRING, "gchararray", &info, &finfo, 0);
|
||||
g_assert (type == G_TYPE_STRING);
|
||||
}
|
||||
|
||||
@@ -743,19 +743,19 @@ g_strdup_value_contents (const GValue *value)
|
||||
else if (g_value_type_transformable (G_VALUE_TYPE (value), G_TYPE_STRING))
|
||||
{
|
||||
GValue tmp_value = { 0, };
|
||||
|
||||
gchar *s;
|
||||
|
||||
g_value_init (&tmp_value, G_TYPE_STRING);
|
||||
g_value_transform (value, &tmp_value);
|
||||
s = g_strescape (g_value_get_string (&tmp_value), NULL);
|
||||
g_value_unset (&tmp_value);
|
||||
if (G_VALUE_HOLDS_ENUM (value) || G_VALUE_HOLDS_FLAGS (value))
|
||||
contents = g_strdup_printf ("((%s) %s)",
|
||||
g_type_name (G_VALUE_TYPE (value)),
|
||||
g_value_get_string (&tmp_value));
|
||||
s);
|
||||
else
|
||||
{
|
||||
src = g_value_get_string (&tmp_value);
|
||||
contents = g_strdup (src ? src : "NULL");
|
||||
}
|
||||
g_value_unset (&tmp_value);
|
||||
contents = g_strdup (s ? s : "NULL");
|
||||
g_free (s);
|
||||
}
|
||||
else if (g_value_fits_pointer (value))
|
||||
{
|
||||
|
Reference in New Issue
Block a user