Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
wrap g_io_channel_ref in a function that returns the passed in GIOCha…
Browse files Browse the repository at this point in the history
…nnel,

Sun Jan 11 15:34:35 2004  Manish Singh  <yosh@gimp.org>

        * gsourceclosure.c: wrap g_io_channel_ref in a function that returns
        the passed in GIOChannel, so we aren't abusing GBoxedCopyFunc
        semantics. Fixes bug #131076.
  • Loading branch information
yosh authored and Manish Singh committed Jan 11, 2004
1 parent af81f44 commit b4e2d28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gobject/ChangeLog
@@ -1,3 +1,9 @@
Sun Jan 11 15:34:35 2004 Manish Singh <yosh@gimp.org>

* gsourceclosure.c: wrap g_io_channel_ref in a function that returns
the passed in GIOChannel, so we aren't abusing GBoxedCopyFunc
semantics. Fixes bug #131076.

Sat Jan 10 23:55:42 2004 Matthias Clasen <maclas@gmx.de>

* glib-mkenums.1: Document the lowercase_name trigraph option.
Expand Down
12 changes: 11 additions & 1 deletion gobject/gsourceclosure.c
Expand Up @@ -24,14 +24,24 @@
#include "gvalue.h"
#include "gvaluetypes.h"

/* This is needed for a proper GBoxedCopyFunc, until the g_io_channel_ref API
* returns it's GIOChannel itself #131076.
*/
static GIOChannel *
wrap_g_io_channel_ref (GIOChannel *channel)
{
g_io_channel_ref (channel);
return channel;
}

GType
g_io_channel_get_type (void)
{
static GType our_type = 0;

if (our_type == 0)
our_type = g_boxed_type_register_static ("GIOChannel",
(GBoxedCopyFunc) g_io_channel_ref,
(GBoxedCopyFunc) wrap_g_io_channel_ref,
(GBoxedFreeFunc) g_io_channel_unref);

return our_type;
Expand Down

0 comments on commit b4e2d28

Please sign in to comment.