mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-05 08:04:49 +01:00
up version number to 1.3.8, interface age 0, binary age 0.
Tue Sep 18 22:57:33 2001 Tim Janik <timj@gtk.org> * configure.in (GLIB_MICRO_VERSION): up version number to 1.3.8, interface age 0, binary age 0. * NEWS: updates. Tue Sep 18 23:09:02 2001 Tim Janik <timj@gtk.org> * gparam.[hc]: rename *nick and *blurb fields to catch direct accesses in third party code. provide g_param_get_nick(), g_param_get_blurb() and g_param_get_name() accessors.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Tue Sep 18 23:09:02 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gparam.[hc]: rename *nick and *blurb fields to catch
|
||||
direct accesses in third party code.
|
||||
provide g_param_get_nick(), g_param_get_blurb() and
|
||||
g_param_get_name() accessors.
|
||||
|
||||
Mon Sep 10 20:31:37 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gobject.[hc]: removed extraneous GObject* returns from a
|
||||
|
||||
@@ -137,8 +137,8 @@ g_param_spec_init (GParamSpec *pspec,
|
||||
GParamSpecClass *class)
|
||||
{
|
||||
pspec->name = NULL;
|
||||
pspec->nick = NULL;
|
||||
pspec->blurb = NULL;
|
||||
pspec->_nick = NULL;
|
||||
pspec->_blurb = NULL;
|
||||
pspec->flags = 0;
|
||||
pspec->value_type = class->value_type;
|
||||
pspec->owner_type = 0;
|
||||
@@ -154,8 +154,8 @@ g_param_spec_finalize (GParamSpec *pspec)
|
||||
g_datalist_clear (&pspec->qdata);
|
||||
|
||||
g_free (pspec->name);
|
||||
g_free (pspec->nick);
|
||||
g_free (pspec->blurb);
|
||||
g_free (pspec->_nick);
|
||||
g_free (pspec->_blurb);
|
||||
|
||||
g_type_free_instance ((GTypeInstance*) pspec);
|
||||
}
|
||||
@@ -234,6 +234,30 @@ g_param_spec_sink (GParamSpec *pspec)
|
||||
}
|
||||
}
|
||||
|
||||
G_CONST_RETURN gchar*
|
||||
g_param_get_name (GParamSpec *pspec)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
|
||||
return pspec->name;
|
||||
}
|
||||
|
||||
G_CONST_RETURN gchar*
|
||||
g_param_get_nick (GParamSpec *pspec)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
|
||||
return pspec->_nick ? pspec->_nick : pspec->name;
|
||||
}
|
||||
|
||||
G_CONST_RETURN gchar*
|
||||
g_param_get_blurb (GParamSpec *pspec)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
|
||||
return pspec->_blurb;
|
||||
}
|
||||
|
||||
gpointer
|
||||
g_param_spec_internal (GType param_type,
|
||||
const gchar *name,
|
||||
@@ -250,8 +274,8 @@ g_param_spec_internal (GType param_type,
|
||||
pspec = (gpointer) g_type_create_instance (param_type);
|
||||
pspec->name = g_strdup (name);
|
||||
g_strcanon (pspec->name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-');
|
||||
pspec->nick = g_strdup (nick ? nick : pspec->name);
|
||||
pspec->blurb = g_strdup (blurb);
|
||||
pspec->_nick = g_strdup (nick);
|
||||
pspec->_blurb = g_strdup (blurb);
|
||||
pspec->flags = (flags & G_PARAM_USER_MASK) | (flags & G_PARAM_MASK);
|
||||
|
||||
return pspec;
|
||||
|
||||
@@ -63,13 +63,13 @@ struct _GParamSpec
|
||||
GTypeInstance g_type_instance;
|
||||
|
||||
gchar *name;
|
||||
gchar *nick;
|
||||
gchar *blurb;
|
||||
GParamFlags flags;
|
||||
GType value_type;
|
||||
GType owner_type; /* class using this property */
|
||||
|
||||
/*< private >*/
|
||||
gchar *_nick;
|
||||
gchar *_blurb;
|
||||
GData *qdata;
|
||||
guint ref_count;
|
||||
guint param_id; /* sort-criteria */
|
||||
@@ -126,6 +126,9 @@ gboolean g_param_value_convert (GParamSpec *dest_value_spec,
|
||||
gint g_param_values_cmp (GParamSpec *pspec,
|
||||
const GValue *value1,
|
||||
const GValue *value2);
|
||||
G_CONST_RETURN gchar* g_param_get_name (GParamSpec *pspec);
|
||||
G_CONST_RETURN gchar* g_param_get_nick (GParamSpec *pspec);
|
||||
G_CONST_RETURN gchar* g_param_get_blurb (GParamSpec *pspec);
|
||||
void g_value_set_param (GValue *value,
|
||||
GParamSpec *param);
|
||||
GParamSpec* g_value_get_param (const GValue *value);
|
||||
|
||||
Reference in New Issue
Block a user