mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
added floating reference count. g_object_is_floating():
Wed Nov 23 18:01:46 2005 Tim Janik <timj@imendio.com> * gobject.[hc]: added floating reference count. g_object_is_floating(): g_object_ref_sink(): new functions to deal with floating references. g_object_force_floating(): new funciton for object implementations to set the floating flag. * gobject.c (g_object_init): make objects initially floating. Wed Nov 23 17:58:13 2005 Tim Janik <timj@gtk.org> * gparam.[hc]: added g_param_spec_ref_sink().
This commit is contained in:
@@ -201,6 +201,17 @@ g_param_spec_sink (GParamSpec *pspec)
|
||||
g_param_spec_unref (pspec);
|
||||
}
|
||||
|
||||
GParamSpec*
|
||||
g_param_spec_ref_sink (GParamSpec *pspec)
|
||||
{
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
g_return_val_if_fail (pspec->ref_count > 0, NULL);
|
||||
|
||||
g_param_spec_ref (pspec);
|
||||
g_param_spec_sink (pspec);
|
||||
return pspec;
|
||||
}
|
||||
|
||||
G_CONST_RETURN gchar*
|
||||
g_param_spec_get_name (GParamSpec *pspec)
|
||||
{
|
||||
|
Reference in New Issue
Block a user