mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-25 03:17:52 +02:00
Use G_DEFINE_[BOXED|POINTER]_TYPE instead of handwritten code
Now that we have convenience macros to implement boxed and pointer types, use them.
This commit is contained in:
@@ -26,19 +26,7 @@
|
||||
#include "gvalue.h"
|
||||
#include "gvaluetypes.h"
|
||||
|
||||
|
||||
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,
|
||||
(GBoxedFreeFunc) g_io_channel_unref);
|
||||
|
||||
return our_type;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (GIOChannel, g_io_channel, g_io_channel_ref, g_io_channel_unref)
|
||||
|
||||
GType
|
||||
g_io_condition_get_type (void)
|
||||
|
Reference in New Issue
Block a user