mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
Make g_io_channel_ref(), g_main_context_ref(), g_hook_ref(),
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)
This commit is contained in:
committed by
Matthias Clasen
parent
0631238743
commit
c83e52605f
@@ -64,14 +64,18 @@ g_async_queue_new (void)
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user