2004-11-08 Matthias Clasen <mclasen@redhat.com>
-
+
+ * glib/gasyncqueue.[hc]:
+ * glib/ghook.[hc]:
+ * glib/gmain.[hc]:
+ * glib/giochannel.[hc]: Make g_io_channel_ref(),
+ g_main_context_ref(), g_hook_ref(), g_async_queue_ref()
+ return the passed in pointer. (#151663, Manish Singh)
+
* glib/gmain.c: Initialize child_watch_count to 1, so
that we don't miss the very first child if it exits
before we set up the child watch. In that case we had
2004-11-08 Matthias Clasen <mclasen@redhat.com>
-
+
+ * glib/gasyncqueue.[hc]:
+ * glib/ghook.[hc]:
+ * glib/gmain.[hc]:
+ * glib/giochannel.[hc]: Make g_io_channel_ref(),
+ g_main_context_ref(), g_hook_ref(), g_async_queue_ref()
+ return the passed in pointer. (#151663, Manish Singh)
+
* glib/gmain.c: Initialize child_watch_count to 1, so
that we don't miss the very first child if it exits
before we set up the child watch. In that case we had
2004-11-08 Matthias Clasen <mclasen@redhat.com>
-
+
+ * glib/gasyncqueue.[hc]:
+ * glib/ghook.[hc]:
+ * glib/gmain.[hc]:
+ * glib/giochannel.[hc]: Make g_io_channel_ref(),
+ g_main_context_ref(), g_hook_ref(), g_async_queue_ref()
+ return the passed in pointer. (#151663, Manish Singh)
+
* glib/gmain.c: Initialize child_watch_count to 1, so
that we don't miss the very first child if it exits
before we set up the child watch. In that case we had
2004-11-08 Matthias Clasen <mclasen@redhat.com>
-
+
+ * glib/gasyncqueue.[hc]:
+ * glib/ghook.[hc]:
+ * glib/gmain.[hc]:
+ * glib/giochannel.[hc]: Make g_io_channel_ref(),
+ g_main_context_ref(), g_hook_ref(), g_async_queue_ref()
+ return the passed in pointer. (#151663, Manish Singh)
+
* glib/gmain.c: Initialize child_watch_count to 1, so
that we don't miss the very first child if it exits
before we set up the child watch. In that case we had
2004-11-08 Matthias Clasen <mclasen@redhat.com>
-
+
+ * glib/gasyncqueue.[hc]:
+ * glib/ghook.[hc]:
+ * glib/gmain.[hc]:
+ * glib/giochannel.[hc]: Make g_io_channel_ref(),
+ g_main_context_ref(), g_hook_ref(), g_async_queue_ref()
+ return the passed in pointer. (#151663, Manish Singh)
+
* glib/gmain.c: Initialize child_watch_count to 1, so
that we don't miss the very first child if it exits
before we set up the child watch. In that case we had
+2004-11-08 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/tmpl/hooks.sgml:
+ * glib/tmpl/iochannels.sgml: Updates
+
2004-11-04 Tor Lillqvist <tml@iki.fi>
* glib/tmpl/windows.sgml: Improve G_WIN32_HAVE_WIDECHAR_API
@hook_list: a #GHookList.
@hook: the #GHook to increment the reference count of.
-
+@returns: the @hook that was passed in (since 2.6)
<!-- ##### FUNCTION g_hook_unref ##### -->
<para>
</para>
@channel: a #GIOChannel.
-
+@Returns: the @channel that was passed in (since 2.6)
<!-- ##### FUNCTION g_io_channel_unref ##### -->
<para>
*
* Increases the reference count of the asynchronous @queue by 1. You
* do not need to hold the lock to call this function.
+ *
+ * Returns: the @queue that was passed in (since 2.6)
**/
-void
+GAsyncQueue *
g_async_queue_ref (GAsyncQueue *queue)
{
g_return_if_fail (queue);
g_return_if_fail (g_atomic_int_get (&queue->ref_count) > 0);
g_atomic_int_inc (&queue->ref_count);
+
+ return queue;
}
/**
void g_async_queue_unlock (GAsyncQueue *queue);
/* Ref and unref the GAsyncQueue. */
-void g_async_queue_ref (GAsyncQueue *queue);
+GAsyncQueue* g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
#ifndef G_DISABLE_DEPRECATED
/* You don't have to hold the lock for calling *_ref and *_unref anymore. */
}
}
-void
+GHook *
g_hook_ref (GHookList *hook_list,
GHook *hook)
{
g_return_if_fail (hook->ref_count > 0);
hook->ref_count++;
+
+ return hook;
}
void
GHook* g_hook_alloc (GHookList *hook_list);
void g_hook_free (GHookList *hook_list,
GHook *hook);
-void g_hook_ref (GHookList *hook_list,
+GHook * g_hook_ref (GHookList *hook_list,
GHook *hook);
void g_hook_unref (GHookList *hook_list,
GHook *hook);
channel->close_on_unref = FALSE;
}
-void
+GIOChannel *
g_io_channel_ref (GIOChannel *channel)
{
g_return_if_fail (channel != NULL);
channel->ref_count++;
+
+ return channel;
}
void
};
void g_io_channel_init (GIOChannel *channel);
-void g_io_channel_ref (GIOChannel *channel);
+GIOChannel *g_io_channel_ref (GIOChannel *channel);
void g_io_channel_unref (GIOChannel *channel);
#ifndef G_DISABLE_DEPRECATED
* @context: a #GMainContext
*
* Increases the reference count on a #GMainContext object by one.
+ *
+ * Returns: the @context that was passed in (since 2.6)
**/
-void
+GMainContext *
g_main_context_ref (GMainContext *context)
{
g_return_if_fail (context != NULL);
/* GMainContext: */
GMainContext *g_main_context_new (void);
-void g_main_context_ref (GMainContext *context);
+GMainContext *g_main_context_ref (GMainContext *context);
void g_main_context_unref (GMainContext *context);
GMainContext *g_main_context_default (void);