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:
Tim Janik
2005-11-23 17:54:41 +00:00
committed by Tim Janik
parent 311094aeab
commit 6e5f465924
6 changed files with 78 additions and 2 deletions

View File

@@ -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)
{