/* The initial reference count of a newly created #GParamSpec is 1, even though no one has explicitly called g_param_spec_ref() on it yet. So the initial reference count is flagged as "floating", until someone calls  */
void g_param_spec_sink(GParamSpec *pspec)
/* The initial reference count of a newly created #GParamSpec is 1, even though no one has explicitly called g_param_spec_ref() on it yet. So the initial reference count is flagged as "floating", until someone calls  */
void g_param_spec_sink(GParamSpec *pspec)
{
  gsize oldvalue;
  g_return_if_fail (G_IS_PARAM_SPEC (pspec));
  oldvalue = g_atomic_pointer_and (&pspec->qdata, ~(gsize)PARAM_FLOATING_FLAG);
  if (oldvalue & PARAM_FLOATING_FLAG)
    g_param_spec_unref (pspec);
}