/* Returns: (type GObject.Object) (transfer none): the same @object  */
gpointer g_object_ref(gpointer _object)
/* Returns: (type GObject.Object) (transfer none): the same @object  */
gpointer g_object_ref(gpointer _object)
{
  GObject *object = _object;
  gint old_val;
  g_return_val_if_fail (G_IS_OBJECT (object), NULL);
  g_return_val_if_fail (object->ref_count > 0, NULL);
  old_val = g_atomic_int_add (&object->ref_count, 1);
  if (old_val == 1 && OBJECT_HAS_TOGGLE_REF (object))
    toggle_refs_notify (object, FALSE);
  TRACE (GOBJECT_OBJECT_REF(object,G_TYPE_FROM_INSTANCE(object),old_val));
  return object;
}